diff --git a/.travis.yml b/.travis.yml
index b9a9431388bf..39f21eaded98 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,11 @@ cache:
- "~/.platformio"
env:
- - TEST_PLATFORM="-e megaatmega2560"
+ - TEST_PLATFORM="megaatmega2560"
+ - TEST_PLATFORM="LPC1768"
+ - TEST_PLATFORM="DUE"
+ - TEST_PLATFORM="STM32F1"
+ - TEST_PLATFORM="teensy35"
before_install:
#
@@ -26,6 +30,8 @@ before_install:
# Publish the buildroot script folder
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
+ - chmod +x ${TRAVIS_BUILD_DIR}/buildroot/share/tests/*
+ - export PATH=${TRAVIS_BUILD_DIR}/buildroot/share/tests/:${PATH}
install:
#- pip install -U platformio
@@ -43,420 +49,4 @@ before_script:
- cat ${TRAVIS_BUILD_DIR}/Marlin/src/inc/_Version.h
#
script:
- #
- # Backup pins_RAMPS.h
- #
- - cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
- #
- # Build with the default configurations
- #
- - restore_configs
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
- # Test a "Fix Mounted" Probe with Safe Homing, some arc options,
- # linear bed leveling, M48, leveling debug, and firmware retraction.
- #
- - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
- - opt_set EXTRUDERS 2
- - opt_set TEMP_SENSOR_0 -2
- - opt_set TEMP_SENSOR_1 1
- - opt_set TEMP_SENSOR_BED 1
- - opt_set POWER_SUPPLY 1
- - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING
- - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
- - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR
- - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
- - opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
- - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING
- - opt_set GRID_MAX_POINTS_X 16
- - opt_set_adv FANMUX0_PIN 53
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
- - opt_set EXTRUDERS 5
- - opt_set TEMP_SENSOR_1 1
- - opt_set TEMP_SENSOR_2 5
- - opt_set TEMP_SENSOR_3 20
- - opt_set TEMP_SENSOR_4 999
- - opt_set TEMP_SENSOR_BED 1
- - opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL SKEW_CORRECTION
- - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC QUICK_HOME
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language
- #
- - opt_set LANGUAGE kana_utf8
- - opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
- - opt_disable SEGMENT_LEVELED_MOVES
- - opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test a Servo Probe
- # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
- #
- - restore_configs
- - opt_enable NUM_SERVOS Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
- - opt_set NUM_SERVOS 1
- - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
- - opt_enable_adv NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test MESH_BED_LEVELING feature, with LCD
- #
- - restore_configs
- - opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test MINIRAMBO for PWM_MOTOR_CURRENT
- # PROBE_MANUALLY feature, with LCD support,
- # ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
- # PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
- # Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
- # ADVANCED_PAUSE_FEATURE, ADVANCED_PAUSE_CONTINUOUS_PURGE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
- # EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
- # INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_MINIRAMBO
- - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
- - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
- - opt_enable ULTIMAKERCONTROLLER SDSUPPORT
- - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632 USE_XMAX_PLUG
- - opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
- - opt_enable_adv ADVANCED_PAUSE_FEATURE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
- - opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
- - opt_set_adv I2C_SLAVE_ADDRESS 63
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Mixing Extruder with 5 steppers
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
- - opt_enable MIXING_EXTRUDER
- - opt_set MIXING_STEPPERS 5
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test DUAL_X_CARRIAGE
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_RUMBA
- - opt_set EXTRUDERS 2
- - opt_set TEMP_SENSOR_1 1
- - opt_enable USE_XMAX_PLUG
- - opt_enable_adv DUAL_X_CARRIAGE
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D
- - opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10
- - opt_set LCD_FEEDBACK_FREQUENCY_HZ 100
- - opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER
- #
- # Test SWITCHING_EXTRUDER
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_RUMBA
- - opt_set EXTRUDERS 2
- - opt_enable NUM_SERVOS
- - opt_set NUM_SERVOS 1
- - opt_set TEMP_SENSOR_1 1
- - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Enable COREXY
- #
- - restore_configs
- - opt_enable COREXY
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test many less common options
- #
- - restore_configs
- - opt_enable COREYX
- - opt_set_adv FAN_MIN_PWM 50
- - opt_set_adv FAN_KICKSTART_TIME 100
- - opt_set_adv XY_FREQUENCY_LIMIT 15
- - opt_enable_adv SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME
- - opt_enable_adv ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED ADVANCED_OK
- - opt_enable_adv VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL
- - opt_enable_adv EXTRA_FAN_SPEED FWERETRACT Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
- - opt_enable_adv MENU_ADDAUTOSTART SDCARD_SORT_ALPHA
- - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER
- - opt_enable FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR
- - opt_enable ENDSTOP_INTERRUPTS_FEATURE FAN_SOFT_PWM SDSUPPORT
- - opt_enable USE_XMAX_PLUG
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- ######## Other Standard LCD/Panels ##############
- #
- # ULTRA_LCD
- #
- - restore_configs
- - opt_enable ULTRA_LCD
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # DOGLCD
- #
- - restore_configs
- - opt_enable DOGLCD
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # MAKRPANEL
- # Needs to use Melzi and Sanguino hardware
- #
- #- restore_configs
- #- opt_enable MAKRPANEL
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, BABYSTEPPING, RIGIDBOARD_V2, and DAC_MOTOR_CURRENT_DEFAULT
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
- - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
- #
- - restore_configs
- - opt_enable G3D_PANEL SDSUPPORT
- - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
- - opt_set_adv SDSORT_GCODE true
- - opt_set_adv SDSORT_USES_RAM true
- - opt_set_adv SDSORT_USES_STACK true
- - opt_set_adv SDSORT_CACHE_NAMES true
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
- #
- - restore_configs
- - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
- - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES LIGHTWEIGHT_UI
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # REPRAPWORLD_KEYPAD
- #
- # Cant find configuration details to get it to compile
- #- restore_configs
- #- opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # RA_CONTROL_PANEL
- #
- - restore_configs
- - opt_enable RA_CONTROL_PANEL PINS_DEBUGGING
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- ######## I2C LCD/PANELS ##############
- #
- # !!!ATTENTION!!!
- # Most I2C configurations are failing at the moment because they require
- # a different Liquid Crystal library "LiquidTWI2".
- #
- # LCD_SAINSMART_I2C_1602
- #
- #- restore_configs
- #- opt_enable LCD_SAINSMART_I2C_1602
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # LCD_I2C_PANELOLU2
- #
- #- restore_configs
- #- opt_enable LCD_I2C_PANELOLU2
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # LCD_I2C_VIKI
- #
- #- restore_configs
- #- opt_enable LCD_I2C_VIKI
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # LCM1602
- #
- - restore_configs
- - opt_enable LCM1602
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- #
- ######## Example Configurations ##############
- #
- # BQ Hephestos 2
- #- restore_configs
- #- use_example_configs Hephestos_2
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
- - use_example_configs delta/generic
- - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
- #
- - use_example_configs delta/generic
- - opt_disable DISABLE_MIN_ENDSTOPS
- - opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Delta Config (FLSUN AC because it's complex)
- #
- - use_example_configs delta/FLSUN/auto_calibrate
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Makibox Config need to check board type for Teensy++ 2.0
- #
- #- use_example_configs makibox
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # SCARA with TMC2130
- #
- - use_example_configs SCARA
- - opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER SCARA_FEEDRATE_SCALING
- - opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
- - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD SENSORLESS_HOMING
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # TMC2208 Config
- #
- - restore_configs
- - opt_enable_adv HAVE_TMC2208 X_IS_TMC2208 Y_IS_TMC2208 Z_IS_TMC2208
- - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # tvrrug Config need to check board type for sanguino atmega644p
- #
- #- use_example_configs tvrrug/Round2
- #- build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- #
- ######## Board Types #############
- #
- # To be added in nightly test branch
- #
-
- - export TEST_PLATFORM="-e teensy35"
- - restore_configs
- - opt_set MOTHERBOARD BOARD_TEENSY35_36
- - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
- - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
- - cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
- #
- # Test Teensy3.5 with default config
- #
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test as many features together as possible
- #
- - restore_configs
- - opt_set EXTRUDERS 2
- - opt_set TEMP_SENSOR_0 1
- - opt_set TEMP_SENSOR_1 5
- - opt_set TEMP_SENSOR_BED 1
- - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
- - opt_enable FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY
- - opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
- - opt_enable BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY
- - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER
- - opt_enable_adv ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA PARK_HEAD_ON_PAUSE
- - opt_set_adv I2C_SLAVE_ADDRESS 63
- - opt_set GRID_MAX_POINTS_X 16
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test a Sled Z Probe with Linear leveling
- #
- - restore_configs
- - opt_enable Z_PROBE_SLED
- - opt_enable AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test a Servo Probe
- #
- - restore_configs
- - opt_enable NUM_SERVOS Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
- - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
- #
- - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS
- - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test MESH_BED_LEVELING feature, with LCD
- #
- - restore_configs
- - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN MANUAL_BED_LEVELING ULTIMAKERCONTROLLER
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Mixing Extruder
- #
- - restore_configs
- - opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1
- - opt_set MIXING_STEPPERS 2
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Test SWITCHING_EXTRUDER
- #
- - restore_configs
- - opt_set EXTRUDERS 2
- - opt_enable NUM_SERVOS
- - opt_set NUM_SERVOS 1
- - opt_set TEMP_SENSOR_1 1
- - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Enable COREXY
- #
- - restore_configs
- - opt_enable COREXY
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Enable COREXZ
- #
- - restore_configs
- - opt_enable COREXZ
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Enable Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS
- #
- - restore_configs
- - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
- - pins_set RAMPS X_MAX_PIN -1
- - opt_add_adv Z2_MAX_PIN 2
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
-
- #############################
- # DUE default config test
- #############################
-
- - export TEST_PLATFORM="-e DUE"
- - restore_configs
- - opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB
- - opt_set BEZIER_JERK_CONTROL
- - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
- - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
-
- #############################
- # LPC1768 default config test
- #############################
-
- - export TEST_PLATFORM="-e LPC1768"
- - restore_configs
- - opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
- - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
- - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
- #
- # Enable VIKI2, SDSUPPORT
- #
- - restore_configs
- - opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB
- - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
- - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
- - opt_enable VIKI2 SDSUPPORT
- - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
+ - start_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index e21b580e3f67..104a797cb034 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 73c25edf30d2..42827a6eed4e 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/Makefile b/Marlin/Makefile
index adee0b4eb9fe..bc0b85a766b8 100644
--- a/Marlin/Makefile
+++ b/Marlin/Makefile
@@ -64,6 +64,9 @@ HARDWARE_MOTHERBOARD ?= 11
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
ARDUINO_VERSION ?= 106
+# The installed Libraries are in the User folder
+ARDUINO_USER_DIR ?= ${HOME}/Arduino
+
# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
AVR_TOOLS_PATH ?=
@@ -110,319 +113,296 @@ endif
# HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ...
# MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ...
-#Gen7
-ifeq ($(HARDWARE_MOTHERBOARD),10)
-HARDWARE_VARIANT ?= Gen7
-MCU ?= atmega644
-F_CPU ?= 20000000
-else ifeq ($(HARDWARE_MOTHERBOARD),11)
-HARDWARE_VARIANT ?= Gen7
-MCU ?= atmega644p
-F_CPU ?= 20000000
-else ifeq ($(HARDWARE_MOTHERBOARD),12)
-HARDWARE_VARIANT ?= Gen7
-MCU ?= atmega644p
-F_CPU ?= 20000000
-else ifeq ($(HARDWARE_MOTHERBOARD),13)
-HARDWARE_VARIANT ?= Gen7
-MCU ?= atmega1284p
-F_CPU ?= 20000000
+ifeq ($(HARDWARE_MOTHERBOARD),0)
-#RAMPS
-else ifeq ($(HARDWARE_MOTHERBOARD),3)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),33)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),34)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),35)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),36)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),38)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),43)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),44)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),45)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),46)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),48)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
+ # No motherboard selected
-#RAMPS equivalents
-else ifeq ($(HARDWARE_MOTHERBOARD),143)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),144)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),145)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),146)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),148)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),77)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),78)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),79)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),401)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),402)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),40)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),41)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),47)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),53)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),504)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),37)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),42)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),52)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),49)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),72)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),80)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),503)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),431)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),343)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),243)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
+#
+# RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
+#
-#Other ATmega1280, ATmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),111)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),112)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),2)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),21)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),200)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),70)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),701)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),703)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),704)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),302)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),303)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),304)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),305)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),21)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),999)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),310)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),321)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),74)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),75)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
+# MEGA/RAMPS up to 1.2
+else ifeq ($(HARDWARE_MOTHERBOARD),3)
+
+# RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
+else ifeq ($(HARDWARE_MOTHERBOARD),33)
+# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
+else ifeq ($(HARDWARE_MOTHERBOARD),34)
+# RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
+else ifeq ($(HARDWARE_MOTHERBOARD),35)
+# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
+else ifeq ($(HARDWARE_MOTHERBOARD),36)
+# RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
+else ifeq ($(HARDWARE_MOTHERBOARD),38)
+
+# RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
+else ifeq ($(HARDWARE_MOTHERBOARD),43)
+# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
+else ifeq ($(HARDWARE_MOTHERBOARD),44)
+# RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
+else ifeq ($(HARDWARE_MOTHERBOARD),45)
+# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
+else ifeq ($(HARDWARE_MOTHERBOARD),46)
+# RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
+else ifeq ($(HARDWARE_MOTHERBOARD),48)
+
+# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
+else ifeq ($(HARDWARE_MOTHERBOARD),143)
+# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
+else ifeq ($(HARDWARE_MOTHERBOARD),144)
+# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
+else ifeq ($(HARDWARE_MOTHERBOARD),145)
+# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
+else ifeq ($(HARDWARE_MOTHERBOARD),146)
+# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
+else ifeq ($(HARDWARE_MOTHERBOARD),148)
-#Gen6
-else ifeq ($(HARDWARE_MOTHERBOARD),5)
-HARDWARE_VARIANT ?= Gen6
-MCU ?= atmega644p
-else ifeq ($(HARDWARE_MOTHERBOARD),51)
-HARDWARE_VARIANT ?= Gen6
-MCU ?= atmega644p
+#
+# RAMPS Derivatives - ATmega1280, ATmega2560
+#
+
+# 3Drag Controller
+else ifeq ($(HARDWARE_MOTHERBOARD),77)
+# Velleman K8200 Controller (derived from 3Drag Controller)
+else ifeq ($(HARDWARE_MOTHERBOARD),78)
+# Velleman K8400 Controller (derived from 3Drag Controller)
+else ifeq ($(HARDWARE_MOTHERBOARD),79)
+# 2PrintBeta BAM&DICE with STK drivers
+else ifeq ($(HARDWARE_MOTHERBOARD),401)
+# 2PrintBeta BAM&DICE Due with STK drivers
+else ifeq ($(HARDWARE_MOTHERBOARD),402)
+# MKS BASE v1.0
+else ifeq ($(HARDWARE_MOTHERBOARD),40)
+# MKS v1.5 with Allegro A4982 stepper drivers
+else ifeq ($(HARDWARE_MOTHERBOARD),405)
+# MKS BASE 1.0 with Heroic HR4982 stepper drivers
+else ifeq ($(HARDWARE_MOTHERBOARD),41)
+# MKS GEN v1.3 or 1.4
+else ifeq ($(HARDWARE_MOTHERBOARD),47)
+# MKS GEN L
+else ifeq ($(HARDWARE_MOTHERBOARD),53)
+# zrib V2.0 control board (Chinese knock off RAMPS replica)
+else ifeq ($(HARDWARE_MOTHERBOARD),504)
+# Felix 2.0+ Electronics Board (RAMPS like)
+else ifeq ($(HARDWARE_MOTHERBOARD),37)
+# Invent-A-Part RigidBoard
+else ifeq ($(HARDWARE_MOTHERBOARD),42)
+# Invent-A-Part RigidBoard V2
+else ifeq ($(HARDWARE_MOTHERBOARD),52)
+# Sainsmart 2-in-1 board
+else ifeq ($(HARDWARE_MOTHERBOARD),49)
+# Ultimaker
+else ifeq ($(HARDWARE_MOTHERBOARD),7)
+# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
+else ifeq ($(HARDWARE_MOTHERBOARD),71)
+MCU ?= atmega1280
+# Azteeg X3
+else ifeq ($(HARDWARE_MOTHERBOARD),67)
+# Azteeg X3 Pro
+else ifeq ($(HARDWARE_MOTHERBOARD),68)
+# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
+else ifeq ($(HARDWARE_MOTHERBOARD),72)
+# Rumba
+else ifeq ($(HARDWARE_MOTHERBOARD),80)
+# bq ZUM Mega 3D
+else ifeq ($(HARDWARE_MOTHERBOARD),503)
+# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
+else ifeq ($(HARDWARE_MOTHERBOARD),431)
+# TriGorilla Anycubic version 1.3 based on RAMPS EFB
+else ifeq ($(HARDWARE_MOTHERBOARD),343)
+# TriGorilla Anycubic version 1.4 based on RAMPS EFB
+else ifeq ($(HARDWARE_MOTHERBOARD),443)
+# Creality: Ender-4, CR-8
+else ifeq ($(HARDWARE_MOTHERBOARD),243)
-#Sanguinololu
-else ifeq ($(HARDWARE_MOTHERBOARD),6)
+#
+# Other ATmega1280, ATmega2560
+#
+
+# Cartesio CN Controls V11
+else ifeq ($(HARDWARE_MOTHERBOARD),111)
+# Cartesio CN Controls V12
+else ifeq ($(HARDWARE_MOTHERBOARD),112)
+# Cheaptronic v1.0
+else ifeq ($(HARDWARE_MOTHERBOARD),2)
+# Cheaptronic v2.0
+else ifeq ($(HARDWARE_MOTHERBOARD),21)
+# Makerbot Mightyboard Revision E
+else ifeq ($(HARDWARE_MOTHERBOARD),200)
+# Megatronics
+else ifeq ($(HARDWARE_MOTHERBOARD),70)
+# Megatronics v2.0
+else ifeq ($(HARDWARE_MOTHERBOARD),701)
+# Megatronics v3.0
+else ifeq ($(HARDWARE_MOTHERBOARD),703)
+# Megatronics v3.1
+else ifeq ($(HARDWARE_MOTHERBOARD),704)
+# Rambo
+else ifeq ($(HARDWARE_MOTHERBOARD),301)
+# Mini-Rambo
+else ifeq ($(HARDWARE_MOTHERBOARD),302)
+# Mini-Rambo 1.0a
+else ifeq ($(HARDWARE_MOTHERBOARD),303)
+# Einsy Rambo
+else ifeq ($(HARDWARE_MOTHERBOARD),304)
+# Einsy Retro
+else ifeq ($(HARDWARE_MOTHERBOARD),305)
+# Elefu Ra Board (v3)
+else ifeq ($(HARDWARE_MOTHERBOARD),21)
+# Leapfrog
+else ifeq ($(HARDWARE_MOTHERBOARD),999)
+# Mega controller
+else ifeq ($(HARDWARE_MOTHERBOARD),310)
+# abee Scoovo X9H
+else ifeq ($(HARDWARE_MOTHERBOARD),321)
+# Geeetech GT2560 Rev. A
+else ifeq ($(HARDWARE_MOTHERBOARD),74)
+# Geeetech GT2560 Rev. A+ (with auto level probe)
+else ifeq ($(HARDWARE_MOTHERBOARD),75)
+
+#
+# ATmega1281, ATmega2561
+#
+
+else ifeq ($(HARDWARE_MOTHERBOARD),702)
+MCU ?= atmega1281
+else ifeq ($(HARDWARE_MOTHERBOARD),25)
+MCU ?= atmega1281
+
+#
+# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
+#
+
+# Sanguinololu < 1.2
+else ifeq ($(HARDWARE_MOTHERBOARD),6)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
-else ifeq ($(HARDWARE_MOTHERBOARD),62)
+# Sanguinololu 1.2 and above
+else ifeq ($(HARDWARE_MOTHERBOARD),62)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
-else ifeq ($(HARDWARE_MOTHERBOARD),63)
+# Melzi
+else ifeq ($(HARDWARE_MOTHERBOARD),63)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
-else ifeq ($(HARDWARE_MOTHERBOARD),64)
+# Melzi with ATmega1284 (MaKr3d version)
+else ifeq ($(HARDWARE_MOTHERBOARD),66)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),65)
+# Melzi Creality3D board (for CR-10 etc)
+else ifeq ($(HARDWARE_MOTHERBOARD),89)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),66)
+# Melzi Malyan M150 board
+else ifeq ($(HARDWARE_MOTHERBOARD),92)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),69)
+# Tronxy X5S
+else ifeq ($(HARDWARE_MOTHERBOARD),505)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),89)
+# STB V1.1
+else ifeq ($(HARDWARE_MOTHERBOARD),64)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),92)
+# Azteeg X1
+else ifeq ($(HARDWARE_MOTHERBOARD),65)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),505)
+# Anet 1.0 (Melzi clone)
+else ifeq ($(HARDWARE_MOTHERBOARD),69)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
-else ifeq ($(HARDWARE_MOTHERBOARD),601)
+
+#
+# Other ATmega644P, ATmega644, ATmega1284P
+#
+
+# Gen3 Monolithic Electronics
+else ifeq ($(HARDWARE_MOTHERBOARD),22)
HARDWARE_VARIANT ?= Sanguino
+MCU ?= atmega644p
+# Gen3+
+else ifeq ($(HARDWARE_MOTHERBOARD),9)
+HARDWARE_VARIANT ?= Sanguino
+MCU ?= atmega644p
+# Gen6
+else ifeq ($(HARDWARE_MOTHERBOARD),5)
+HARDWARE_VARIANT ?= Gen6
+MCU ?= atmega644p
+# Gen6 deluxe
+else ifeq ($(HARDWARE_MOTHERBOARD),51)
+HARDWARE_VARIANT ?= Gen6
+MCU ?= atmega644p
+# Gen7 custom (Alfons3 Version)
+else ifeq ($(HARDWARE_MOTHERBOARD),10)
+HARDWARE_VARIANT ?= Gen7
+MCU ?= atmega644
+F_CPU ?= 20000000
+# Gen7 v1.1, v1.2
+else ifeq ($(HARDWARE_MOTHERBOARD),11)
+HARDWARE_VARIANT ?= Gen7
+MCU ?= atmega644p
+F_CPU ?= 20000000
+# Gen7 v1.3
+else ifeq ($(HARDWARE_MOTHERBOARD),12)
+HARDWARE_VARIANT ?= Gen7
+MCU ?= atmega644p
+F_CPU ?= 20000000
+# Gen7 v1.4
+else ifeq ($(HARDWARE_MOTHERBOARD),13)
+HARDWARE_VARIANT ?= Gen7
MCU ?= atmega1284p
+F_CPU ?= 20000000
+# Alpha OMCA board
+else ifeq ($(HARDWARE_MOTHERBOARD),90)
+HARDWARE_VARIANT ?= SanguinoA
+MCU ?= atmega644
+# Final OMCA board
+else ifeq ($(HARDWARE_MOTHERBOARD),91)
+HARDWARE_VARIANT ?= Sanguino
+MCU ?= atmega644p
+# Sethi 3D_1
+else ifeq ($(HARDWARE_MOTHERBOARD),20)
+HARDWARE_VARIANT ?= Sanguino
+MCU ?= atmega644p
-#Ultimaker
-else ifeq ($(HARDWARE_MOTHERBOARD),7)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),71)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega1280
-
-#ATmega1281, ATmega2561
-else ifeq ($(HARDWARE_MOTHERBOARD),702)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega1281
-else ifeq ($(HARDWARE_MOTHERBOARD),25)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega1281
+#
+# Teensyduino - AT90USB1286, AT90USB1286P
+#
-#Teensylu
-else ifeq ($(HARDWARE_MOTHERBOARD),8)
+# Teensylu
+else ifeq ($(HARDWARE_MOTHERBOARD),8)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
-else ifeq ($(HARDWARE_MOTHERBOARD),81)
+# Printrboard (AT90USB1286)
+else ifeq ($(HARDWARE_MOTHERBOARD),81)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
-else ifeq ($(HARDWARE_MOTHERBOARD),811)
+# Printrboard Revision F (AT90USB1286)
+else ifeq ($(HARDWARE_MOTHERBOARD),811)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
-else ifeq ($(HARDWARE_MOTHERBOARD),82)
+# Brainwave (AT90USB646)
+else ifeq ($(HARDWARE_MOTHERBOARD),82)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb646
-else ifeq ($(HARDWARE_MOTHERBOARD),83)
+# Brainwave Pro (AT90USB1286)
+else ifeq ($(HARDWARE_MOTHERBOARD),83)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
-else ifeq ($(HARDWARE_MOTHERBOARD),84)
+# SAV Mk-I (AT90USB1286)
+else ifeq ($(HARDWARE_MOTHERBOARD),84)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
-else ifeq ($(HARDWARE_MOTHERBOARD),88)
+# Teensy++2.0 (AT90USB1286)
+else ifeq ($(HARDWARE_MOTHERBOARD),85)
+HARDWARE_VARIANT ?= Teensy
+MCU ?= at90usb1286
+# 5DPrint D8 Driver Board
+else ifeq ($(HARDWARE_MOTHERBOARD),88)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
-
-#Gen3+
-else ifeq ($(HARDWARE_MOTHERBOARD),9)
-HARDWARE_VARIANT ?= Sanguino
-MCU ?= atmega644p
-
-#Gen3 Monolithic Electronics
-else ifeq ($(HARDWARE_MOTHERBOARD),22)
-HARDWARE_VARIANT ?= Sanguino
-MCU ?= atmega644p
-
-#Megatronics
-else ifeq ($(HARDWARE_MOTHERBOARD),70)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-
-#Alpha OMCA board
-else ifeq ($(HARDWARE_MOTHERBOARD),90)
-HARDWARE_VARIANT ?= SanguinoA
-MCU ?= atmega644
-
-#Final OMCA board
-else ifeq ($(HARDWARE_MOTHERBOARD),91)
-HARDWARE_VARIANT ?= Sanguino
-MCU ?= atmega644p
-
-#Sethi 3D_1
-else ifeq ($(HARDWARE_MOTHERBOARD),20)
-HARDWARE_VARIANT ?= Sanguino
-MCU ?= atmega644p
-
-#Rambo
-else ifeq ($(HARDWARE_MOTHERBOARD),301)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-
-#Azteeg
-else ifeq ($(HARDWARE_MOTHERBOARD),67)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
-else ifeq ($(HARDWARE_MOTHERBOARD),68)
-HARDWARE_VARIANT ?= arduino
-MCU ?= atmega2560
endif
@@ -431,6 +411,10 @@ endif
# Set to 16Mhz if not yet set.
F_CPU ?= 16000000
+# Set to arduino, ATmega2560 if not yet set.
+HARDWARE_VARIANT ?= arduino
+MCU ?= atmega2560
+
# Arduino contained the main source code for the Arduino
# Libraries, the "hardware variant" are for boards
# that derives from that, and their source are present in
@@ -448,6 +432,17 @@ TARGET = $(notdir $(CURDIR))
VPATH = .
VPATH += $(BUILD_DIR)
+VPATH += $(HARDWARE_SRC)
+
+# U8glib
+VPATH += $(ARDUINO_USER_DIR)/libraries/U8glib
+VPATH += $(ARDUINO_USER_DIR)/libraries/U8glib/clib
+
+ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/LiquidCrystal/src
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/SPI
+endif
+
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
@@ -479,10 +474,10 @@ HARDWARE_SUB_VARIANT ?= mega
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
else
ifeq ($(HARDWARE_VARIANT), Sanguino)
-VPATH += $(HARDWARE_DIR)/marlin/avr/variants/sanguino
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/variants/sanguino
else
HARDWARE_SUB_VARIANT ?= standard
-VPATH += $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
endif
endif
LIB_SRC = wiring.c \
diff --git a/Marlin/src/HAL/Delay.h b/Marlin/src/HAL/Delay.h
new file mode 100644
index 000000000000..972f1e2c18be
--- /dev/null
+++ b/Marlin/src/HAL/Delay.h
@@ -0,0 +1,148 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Busy wait delay cycles routines:
+ *
+ * DELAY_CYCLES(count): Delay execution in cycles
+ * DELAY_NS(count): Delay execution in nanoseconds
+ * DELAY_US(count): Delay execution in microseconds
+ */
+
+#ifndef MARLIN_DELAY_H
+#define MARLIN_DELAY_H
+
+#include "../core/macros.h"
+
+#if defined(__arm__) || defined(__thumb__)
+
+ // https://blueprints.launchpad.net/gcc-arm-embedded/+spec/delay-cycles
+
+ #define nop() __asm__ __volatile__("nop;\n\t":::)
+
+ FORCE_INLINE static void __delay_4cycles(uint32_t cy) { // +1 cycle
+ #if ARCH_PIPELINE_RELOAD_CYCLES < 2
+ #define EXTRA_NOP_CYCLES A("nop")
+ #else
+ #define EXTRA_NOP_CYCLES ""
+ #endif
+
+ __asm__ __volatile__(
+ A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
+ L("1")
+ A("subs %[cnt],#1")
+ EXTRA_NOP_CYCLES
+ A("bne 1b")
+ : [cnt]"+r"(cy) // output: +r means input+output
+ : // input:
+ : "cc" // clobbers:
+ );
+ }
+
+ // Delay in cycles
+ FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
+
+ if (__builtin_constant_p(x)) {
+ #define MAXNOPS 4
+
+ if (x <= (MAXNOPS)) {
+ switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
+ }
+ else { // because of +1 cycle inside delay_4cycles
+ const uint32_t rem = (x - 1) % (MAXNOPS);
+ switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
+ if ((x = (x - 1) / (MAXNOPS)))
+ __delay_4cycles(x); // if need more then 4 nop loop is more optimal
+ }
+ #undef MAXNOPS
+ }
+ else
+ __delay_4cycles(x / 4);
+ }
+ #undef nop
+
+#elif defined(__AVR__)
+
+ #define nop() __asm__ __volatile__("nop;\n\t":::)
+
+ FORCE_INLINE static void __delay_4cycles(uint8_t cy) {
+ __asm__ __volatile__(
+ L("1")
+ A("dec %[cnt]")
+ A("nop")
+ A("brne 1b")
+ : [cnt] "+r"(cy) // output: +r means input+output
+ : // input:
+ : "cc" // clobbers:
+ );
+ }
+
+ // Delay in cycles
+ FORCE_INLINE static void DELAY_CYCLES(uint16_t x) {
+
+ if (__builtin_constant_p(x)) {
+ #define MAXNOPS 4
+
+ if (x <= (MAXNOPS)) {
+ switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
+ }
+ else {
+ const uint32_t rem = (x) % (MAXNOPS);
+ switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
+ if ((x = (x) / (MAXNOPS)))
+ __delay_4cycles(x); // if need more then 4 nop loop is more optimal
+ }
+
+ #undef MAXNOPS
+ }
+ else
+ __delay_4cycles(x / 4);
+ }
+ #undef nop
+
+#elif defined(ESP32)
+
+ FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
+ unsigned long ccount, stop;
+
+ __asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
+
+ stop = ccount + x; // This can overflow
+
+ while (ccount < stop) { // This doesn't deal with overflows
+ __asm__ __volatile__ ( "rsr %0, ccount" : "=a" (ccount) );
+ }
+ }
+
+#else
+
+ #error "Unsupported MCU architecture"
+
+#endif
+
+// Delay in nanoseconds
+#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) / 1000L )
+
+// Delay in microseconds
+#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) )
+
+#endif // MARLIN_DELAY_H
diff --git a/Marlin/src/HAL/HAL.h b/Marlin/src/HAL/HAL.h
deleted file mode 100644
index ccd0d9888f63..000000000000
--- a/Marlin/src/HAL/HAL.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
-
-/**
- * Description: HAL wrapper
- *
- * Supports platforms :
- * ARDUINO_ARCH_SAM : For Arduino Due and other boards based on Atmel SAM3X8E
- * __AVR__ : For all Atmel AVR boards
- */
-
-#ifndef _HAL_H
-#define _HAL_H
-
-#include "HAL_SPI.h"
-
-#define CPU_32_BIT
-
-#ifdef __AVR__
- #undef CPU_32_BIT
- #include "HAL_AVR/HAL_AVR.h"
-#elif defined(ARDUINO_ARCH_SAM)
- #include "HAL_DUE/HAL_Due.h"
- #include "math_32bit.h"
-#elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
- #include "HAL_TEENSY35_36/HAL_Teensy.h"
- #include "math_32bit.h"
-#elif defined(TARGET_LPC1768)
- #include "math_32bit.h"
- #include "HAL_LPC1768/HAL.h"
-#elif defined(__STM32F1__) || defined(TARGET_STM32F1)
- #include "math_32bit.h"
- #include "HAL_STM32F1/HAL_Stm32f1.h"
-#elif defined(STM32F7)
- #define CPU_32_BIT
- #include "math_32bit.h"
- #include "HAL_STM32F7/HAL_STM32F7.h"
-#else
- #error "Unsupported Platform!"
-#endif
-
-#endif // _HAL_H
diff --git a/Marlin/src/HAL/HAL_AVR/HAL_AVR.cpp b/Marlin/src/HAL/HAL_AVR/HAL.cpp
similarity index 97%
rename from Marlin/src/HAL/HAL_AVR/HAL_AVR.cpp
rename to Marlin/src/HAL/HAL_AVR/HAL.cpp
index 9c69b90a864f..e69455976167 100644
--- a/Marlin/src/HAL/HAL_AVR/HAL_AVR.cpp
+++ b/Marlin/src/HAL/HAL_AVR/HAL.cpp
@@ -20,13 +20,6 @@
****************************************************************************/
-/**
- * Description: HAL for AVR
- *
- * For __AVR__
- */
-
-
#ifdef __AVR__
// --------------------------------------------------------------------------
@@ -34,6 +27,7 @@
// --------------------------------------------------------------------------
#include "../../inc/MarlinConfig.h"
+#include "HAL.h"
// --------------------------------------------------------------------------
// Externals
@@ -74,9 +68,11 @@
// --------------------------------------------------------------------------
#if ENABLED(SDSUPPORT)
+
#include "../../sd/SdFatUtil.h"
int freeMemory() { return SdFatUtil::FreeRam(); }
-#else
+
+#else // !SDSUPPORT
extern "C" {
extern char __bss_end;
@@ -93,7 +89,6 @@ extern "C" {
}
}
-#endif //!SDSUPPORT
-
-#endif
+#endif // !SDSUPPORT
+#endif // __AVR__
diff --git a/Marlin/src/HAL/HAL_AVR/HAL.h b/Marlin/src/HAL/HAL_AVR/HAL.h
new file mode 100644
index 000000000000..02aafc0fbdd4
--- /dev/null
+++ b/Marlin/src/HAL/HAL_AVR/HAL.h
@@ -0,0 +1,360 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef _HAL_AVR_H_
+#define _HAL_AVR_H_
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include "../HAL_SPI.h"
+#include "fastio_AVR.h"
+#include "watchdog_AVR.h"
+#include "math_AVR.h"
+
+#ifdef USBCON
+ #include "HardwareSerial.h"
+#else
+ #include "MarlinSerial.h"
+#endif
+
+// --------------------------------------------------------------------------
+// Defines
+// --------------------------------------------------------------------------
+
+//#define analogInputToDigitalPin(IO) IO
+
+#ifndef CRITICAL_SECTION_START
+ #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli()
+ #define CRITICAL_SECTION_END SREG = _sreg
+#endif
+#define ISRS_ENABLED() TEST(SREG, SREG_I)
+#define ENABLE_ISRS() sei()
+#define DISABLE_ISRS() cli()
+
+// On AVR this is in math.h?
+//#define square(x) ((x)*(x))
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+typedef uint16_t hal_timer_t;
+#define HAL_TIMER_TYPE_MAX 0xFFFF
+
+typedef int8_t pin_t;
+
+#define HAL_SERVO_LIB Servo
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+//extern uint8_t MCUSR;
+
+#define NUM_SERIAL 1
+
+#ifdef USBCON
+ #if ENABLED(BLUETOOTH)
+ #define MYSERIAL0 bluetoothSerial
+ #else
+ #define MYSERIAL0 Serial
+ #endif
+#else
+ #define MYSERIAL0 customizedSerial
+#endif
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+//void cli(void);
+
+//void _delay_ms(const int delay);
+
+inline void HAL_clear_reset_source(void) { MCUSR = 0; }
+inline uint8_t HAL_get_reset_source(void) { return MCUSR; }
+
+extern "C" {
+ int freeMemory(void);
+}
+
+// timers
+#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
+
+#define STEP_TIMER_NUM 1
+#define TEMP_TIMER_NUM 0
+#define PULSE_TIMER_NUM STEP_TIMER_NUM
+
+#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
+
+#define STEPPER_TIMER_RATE HAL_TIMER_RATE
+#define STEPPER_TIMER_PRESCALE 8
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
+
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
+
+#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
+#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
+#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A)
+
+#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
+#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
+#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B)
+
+FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
+ UNUSED(frequency);
+ switch (timer_num) {
+ case STEP_TIMER_NUM:
+ // waveform generation = 0100 = CTC
+ SET_WGM(1, CTC_OCRnA);
+
+ // output mode = 00 (disconnected)
+ SET_COMA(1, NORMAL);
+
+ // Set the timer pre-scaler
+ // Generally we use a divider of 8, resulting in a 2MHz timer
+ // frequency on a 16MHz MCU. If you are going to change this, be
+ // sure to regenerate speed_lookuptable.h with
+ // create_speed_lookuptable.py
+ SET_CS(1, PRESCALER_8); // CS 2 = 1/8 prescaler
+
+ // Init Stepper ISR to 122 Hz for quick starting
+ // (F_CPU) / (STEPPER_TIMER_PRESCALE) / frequency
+ OCR1A = 0x4000;
+ TCNT1 = 0;
+ break;
+
+ case TEMP_TIMER_NUM:
+ // Use timer0 for temperature measurement
+ // Interleave temperature interrupt with millies interrupt
+ OCR0B = 128;
+ break;
+ }
+}
+
+#define TIMER_OCR_1 OCR1A
+#define TIMER_COUNTER_1 TCNT1
+
+#define TIMER_OCR_0 OCR0A
+#define TIMER_COUNTER_0 TCNT0
+
+#define _CAT(a, ...) a ## __VA_ARGS__
+#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
+#define HAL_timer_restrain(timer, interval_ticks) NOLESS(_CAT(TIMER_OCR_, timer), _CAT(TIMER_COUNTER_, timer) + interval_ticks)
+
+#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
+#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
+
+/**
+ * On AVR there is no hardware prioritization and preemption of
+ * interrupts, so this emulates it. The UART has first priority
+ * (otherwise, characters will be lost due to UART overflow).
+ * Then: Stepper, Endstops, Temperature, and -finally- all others.
+ */
+#define HAL_timer_isr_prologue(TIMER_NUM)
+#define HAL_timer_isr_epilogue(TIMER_NUM)
+
+/* 18 cycles maximum latency */
+#define HAL_STEP_TIMER_ISR \
+extern "C" void TIMER1_COMPA_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
+extern "C" void TIMER1_COMPA_vect_bottom (void) asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
+void TIMER1_COMPA_vect (void) { \
+ __asm__ __volatile__ ( \
+ A("push r16") /* 2 Save R16 */ \
+ A("in r16, __SREG__") /* 1 Get SREG */ \
+ A("push r16") /* 2 Save SREG into stack */ \
+ A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
+ A("push r16") /* 2 Save TIMSK0 into the stack */ \
+ A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
+ A("sts %[timsk0], r16") /* 2 And set the new value */ \
+ A("lds r16, %[timsk1]") /* 2 Load into R0 the stepper timer Interrupt mask register [TIMSK1] */ \
+ A("andi r16,~%[msk1]") /* 1 Disable the stepper ISR */ \
+ A("sts %[timsk1], r16") /* 2 And set the new value */ \
+ A("push r16") /* 2 Save TIMSK1 into stack */ \
+ A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
+ A("push r16") /* 2 Save RAMPZ into stack */ \
+ A("in r16, 0x3C") /* 1 Get EIND register */ \
+ A("push r0") /* C runtime can modify all the following registers without restoring them */ \
+ A("push r1") \
+ A("push r18") \
+ A("push r19") \
+ A("push r20") \
+ A("push r21") \
+ A("push r22") \
+ A("push r23") \
+ A("push r24") \
+ A("push r25") \
+ A("push r26") \
+ A("push r27") \
+ A("push r30") \
+ A("push r31") \
+ A("clr r1") /* C runtime expects this register to be 0 */ \
+ A("call TIMER1_COMPA_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
+ A("pop r31") \
+ A("pop r30") \
+ A("pop r27") \
+ A("pop r26") \
+ A("pop r25") \
+ A("pop r24") \
+ A("pop r23") \
+ A("pop r22") \
+ A("pop r21") \
+ A("pop r20") \
+ A("pop r19") \
+ A("pop r18") \
+ A("pop r1") \
+ A("pop r0") \
+ A("out 0x3C, r16") /* 1 Restore EIND register */ \
+ A("pop r16") /* 2 Get the original RAMPZ register value */ \
+ A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
+ A("pop r16") /* 2 Get the original TIMSK1 value but with stepper ISR disabled */ \
+ A("ori r16,%[msk1]") /* 1 Reenable the stepper ISR */ \
+ A("cli") /* 1 Disable global interrupts - Reenabling Stepper ISR can reenter amd temperature can reenter, and we want that, if it happens, after this ISR has ended */ \
+ A("sts %[timsk1], r16") /* 2 And restore the old value - This reenables the stepper ISR */ \
+ A("pop r16") /* 2 Get the temperature timer Interrupt mask register [TIMSK0] */ \
+ A("sts %[timsk0], r16") /* 2 And restore the old value - This reenables the temperature ISR */ \
+ A("pop r16") /* 2 Get the old SREG value */ \
+ A("out __SREG__, r16") /* 1 And restore the SREG value */ \
+ A("pop r16") /* 2 Restore R16 value */ \
+ A("reti") /* 4 Return from interrupt */ \
+ : \
+ : [timsk0] "i" ((uint16_t)&TIMSK0), \
+ [timsk1] "i" ((uint16_t)&TIMSK1), \
+ [msk0] "M" ((uint8_t)(1< 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
+#else
+ #define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
+#endif
+
+#define HAL_READ_ADC() ADC
+#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
+
+#define GET_PIN_MAP_PIN(index) index
+#define GET_PIN_MAP_INDEX(pin) pin
+#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
+
+#define HAL_SENSITIVE_PINS 0, 1
+
+// AVR compatibility
+#define strtof strtod
+
+#endif // _HAL_AVR_H_
diff --git a/Marlin/src/HAL/HAL_AVR/HAL_AVR.h b/Marlin/src/HAL/HAL_AVR/HAL_AVR.h
deleted file mode 100644
index 1a5d02682a46..000000000000
--- a/Marlin/src/HAL/HAL_AVR/HAL_AVR.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
-
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
-
-/**
- * Description: HAL for AVR
- *
- * For __AVR__
- */
-
-
-#ifndef _HAL_AVR_H_
-#define _HAL_AVR_H_
-
-// --------------------------------------------------------------------------
-// Includes
-// --------------------------------------------------------------------------
-
-#include
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-#include "fastio_AVR.h"
-#include "watchdog_AVR.h"
-#include "math_AVR.h"
-
-#ifdef USBCON
- #include "HardwareSerial.h"
-#else
- #include "MarlinSerial.h"
-#endif
-
-// --------------------------------------------------------------------------
-// Defines
-// --------------------------------------------------------------------------
-
-//#define analogInputToDigitalPin(IO) IO
-
-#ifndef CRITICAL_SECTION_START
- #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
- #define CRITICAL_SECTION_END SREG = _sreg;
-#endif
-
-
-// On AVR this is in math.h?
-//#define square(x) ((x)*(x))
-
-// --------------------------------------------------------------------------
-// Types
-// --------------------------------------------------------------------------
-
-typedef uint16_t hal_timer_t;
-#define HAL_TIMER_TYPE_MAX 0xFFFF
-
-typedef int8_t pin_t;
-
-#define HAL_SERVO_LIB Servo
-
-// --------------------------------------------------------------------------
-// Public Variables
-// --------------------------------------------------------------------------
-
-//extern uint8_t MCUSR;
-
-#define NUM_SERIAL 1
-
-#ifdef USBCON
- #if ENABLED(BLUETOOTH)
- #define MYSERIAL0 bluetoothSerial
- #else
- #define MYSERIAL0 Serial
- #endif
-#else
- #define MYSERIAL0 customizedSerial
-#endif
-
-// --------------------------------------------------------------------------
-// Public functions
-// --------------------------------------------------------------------------
-
-//void cli(void);
-
-//void _delay_ms(const int delay);
-
-inline void HAL_clear_reset_source(void) { MCUSR = 0; }
-inline uint8_t HAL_get_reset_source(void) { return MCUSR; }
-
-extern "C" {
- int freeMemory(void);
-}
-
-// eeprom
-//void eeprom_write_byte(unsigned char *pos, unsigned char value);
-//unsigned char eeprom_read_byte(unsigned char *pos);
-
-
-// timers
-#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
-#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
-
-#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
-
-#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE
-#define STEPPER_TIMER_PRESCALE 8
-
-#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
-
-#define STEP_TIMER_NUM 1
-#define TIMER_OCR_1 OCR1A
-#define TIMER_COUNTER_1 TCNT1
-
-#define TEMP_TIMER_NUM 0
-#define TIMER_OCR_0 OCR0A
-#define TIMER_COUNTER_0 TCNT0
-
-#define PULSE_TIMER_NUM TEMP_TIMER_NUM
-#define PULSE_TIMER_PRESCALE 8
-
-#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
-#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
-#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A)
-
-#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
-#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
-
-#define HAL_timer_start(timer_num, frequency)
-
-#define _CAT(a, ...) a ## __VA_ARGS__
-#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
-#define HAL_timer_restrain(timer, interval_ticks) NOLESS(_CAT(TIMER_OCR_, timer), _CAT(TIMER_COUNTER_, timer) + interval_ticks)
-
-#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
-#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
-
-#define HAL_timer_isr_prologue(timer_num)
-
-#define HAL_STEP_TIMER_ISR ISR(TIMER1_COMPA_vect)
-#define HAL_TEMP_TIMER_ISR ISR(TIMER0_COMPB_vect)
-
-#define HAL_ENABLE_ISRs() do { cli(); if (thermalManager.in_temp_isr) DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
-
-// ADC
-#ifdef DIDR2
- #define HAL_ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin & 0x07); }while(0)
-#else
- #define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
-#endif
-
-inline void HAL_adc_init(void) {
- ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
- DIDR0 = 0;
- #ifdef DIDR2
- DIDR2 = 0;
- #endif
-}
-
-#define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC)
-#ifdef MUX5
- #define HAL_START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
-#else
- #define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
-#endif
-
-#define HAL_READ_ADC ADC
-
-#define GET_PIN_MAP_PIN(index) index
-#define GET_PIN_MAP_INDEX(pin) pin
-#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
-
-#define HAL_SENSITIVE_PINS 0, 1
-
-#endif // _HAL_AVR_H_
diff --git a/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp b/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
index 87323861a095..4e4b2481829c 100644
--- a/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
+++ b/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
@@ -162,22 +162,15 @@ void spiBegin (void) {
// away. When clock is not known, use a loop instead, which generates
// shorter code.
if (__builtin_constant_p(spiClock)) {
- if (spiClock >= F_CPU / 2) {
- clockDiv = 0;
- } else if (spiClock >= F_CPU / 4) {
- clockDiv = 1;
- } else if (spiClock >= F_CPU / 8) {
- clockDiv = 2;
- } else if (spiClock >= F_CPU / 16) {
- clockDiv = 3;
- } else if (spiClock >= F_CPU / 32) {
- clockDiv = 4;
- } else if (spiClock >= F_CPU / 64) {
- clockDiv = 5;
- } else {
- clockDiv = 6;
- }
- } else {
+ if (spiClock >= F_CPU / 2) clockDiv = 0;
+ else if (spiClock >= F_CPU / 4) clockDiv = 1;
+ else if (spiClock >= F_CPU / 8) clockDiv = 2;
+ else if (spiClock >= F_CPU / 16) clockDiv = 3;
+ else if (spiClock >= F_CPU / 32) clockDiv = 4;
+ else if (spiClock >= F_CPU / 64) clockDiv = 5;
+ else clockDiv = 6;
+ }
+ else {
uint32_t clockSetting = F_CPU / 2;
clockDiv = 0;
while (clockDiv < 6 && spiClock < clockSetting) {
@@ -187,8 +180,7 @@ void spiBegin (void) {
}
// Compensate for the duplicate fosc/64
- if (clockDiv == 6)
- clockDiv = 7;
+ if (clockDiv == 6) clockDiv = 7;
// Invert the SPI2X bit
clockDiv ^= 0x1;
diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp b/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
index c15659438123..ece249776636 100644
--- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
+++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
@@ -28,7 +28,9 @@
* Modified 28 September 2010 by Mark Sproul
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
+ * Modified 10 June 2018 by Eduardo José Tagle (See #10991)
*/
+
#ifdef __AVR__
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
@@ -56,232 +58,317 @@
ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
#if TX_BUFFER_SIZE > 0
ring_buffer_t tx_buffer = { { 0 }, 0, 0 };
- static bool _written;
#endif
+ static bool _written;
#endif
#if ENABLED(SERIAL_XON_XOFF)
- constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80; // XON / XOFF Character was sent
- constexpr uint8_t XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
+ constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80, // XON / XOFF Character was sent
+ XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
// XON / XOFF character definitions
- constexpr uint8_t XON_CHAR = 17;
- constexpr uint8_t XOFF_CHAR = 19;
+ constexpr uint8_t XON_CHAR = 17, XOFF_CHAR = 19;
uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
#endif
- void clear_command_queue();
-
#if ENABLED(SERIAL_STATS_DROPPED_RX)
uint8_t rx_dropped_bytes = 0;
#endif
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ uint8_t rx_buffer_overruns = 0;
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ uint8_t rx_framing_errors = 0;
+ #endif
+
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
ring_buffer_pos_t rx_max_enqueued = 0;
#endif
+ // A SW memory barrier, to ensure GCC does not overoptimize loops
+ #define sw_barrier() asm volatile("": : :"memory");
+
#if ENABLED(EMERGENCY_PARSER)
+ #include "../../feature/emergency_parser.h"
+ #endif
+
+ // "Atomically" read the RX head index value without disabling interrupts:
+ // This MUST be called with RX interrupts enabled, and CAN'T be called
+ // from the RX ISR itself!
+ FORCE_INLINE ring_buffer_pos_t atomic_read_rx_head() {
+ #if RX_BUFFER_SIZE > 256
+ // Keep reading until 2 consecutive reads return the same value,
+ // meaning there was no update in-between caused by an interrupt.
+ // This works because serial RX interrupts happen at a slower rate
+ // than successive reads of a variable, so 2 consecutive reads with
+ // the same value means no interrupt updated it.
+ ring_buffer_pos_t vold, vnew = rx_buffer.head;
+ sw_barrier();
+ do {
+ vold = vnew;
+ vnew = rx_buffer.head;
+ sw_barrier();
+ } while (vold != vnew);
+ return vnew;
+ #else
+ // With an 8bit index, reads are always atomic. No need for special handling
+ return rx_buffer.head;
+ #endif
+ }
+
+ #if RX_BUFFER_SIZE > 256
+ static volatile bool rx_tail_value_not_stable = false;
+ static volatile uint16_t rx_tail_value_backup = 0;
+ #endif
+
+ // Set RX tail index, taking into account the RX ISR could interrupt
+ // the write to this variable in the middle - So a backup strategy
+ // is used to ensure reads of the correct values.
+ // -Must NOT be called from the RX ISR -
+ FORCE_INLINE void atomic_set_rx_tail(ring_buffer_pos_t value) {
+ #if RX_BUFFER_SIZE > 256
+ // Store the new value in the backup
+ rx_tail_value_backup = value;
+ sw_barrier();
+ // Flag we are about to change the true value
+ rx_tail_value_not_stable = true;
+ sw_barrier();
+ // Store the new value
+ rx_buffer.tail = value;
+ sw_barrier();
+ // Signal the new value is completely stored into the value
+ rx_tail_value_not_stable = false;
+ sw_barrier();
+ #else
+ rx_buffer.tail = value;
+ #endif
+ }
- bool killed_by_M112; // = false
+ // Get the RX tail index, taking into account the read could be
+ // interrupting in the middle of the update of that index value
+ // -Called from the RX ISR -
+ FORCE_INLINE ring_buffer_pos_t atomic_read_rx_tail() {
+ #if RX_BUFFER_SIZE > 256
+ // If the true index is being modified, return the backup value
+ if (rx_tail_value_not_stable) return rx_tail_value_backup;
+ #endif
+ // The true index is stable, return it
+ return rx_buffer.tail;
+ }
- #include "../../module/stepper.h"
+ // (called with RX interrupts disabled)
+ FORCE_INLINE void store_rxd_char() {
- // Currently looking for: M108, M112, M410
- // If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
+ #if ENABLED(EMERGENCY_PARSER)
+ static EmergencyParser::State emergency_state; // = EP_RESET
+ #endif
- FORCE_INLINE void emergency_parser(const uint8_t c) {
+ // Get the tail - Nothing can alter its value while this ISR is executing, but there's
+ // a chance that this ISR interrupted the main process while it was updating the index.
+ // The backup mechanism ensures the correct value is always returned.
+ const ring_buffer_pos_t t = atomic_read_rx_tail();
- static e_parser_state state = state_RESET;
+ // Get the head pointer - This ISR is the only one that modifies its value, so it's safe to read here
+ ring_buffer_pos_t h = rx_buffer.head;
- switch (state) {
- case state_RESET:
- switch (c) {
- case ' ': break;
- case 'N': state = state_N; break;
- case 'M': state = state_M; break;
- default: state = state_IGNORE;
- }
- break;
-
- case state_N:
- switch (c) {
- case '0': case '1': case '2':
- case '3': case '4': case '5':
- case '6': case '7': case '8':
- case '9': case '-': case ' ': break;
- case 'M': state = state_M; break;
- default: state = state_IGNORE;
- }
- break;
-
- case state_M:
- switch (c) {
- case ' ': break;
- case '1': state = state_M1; break;
- case '4': state = state_M4; break;
- default: state = state_IGNORE;
- }
- break;
+ // Get the next element
+ ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
- case state_M1:
- switch (c) {
- case '0': state = state_M10; break;
- case '1': state = state_M11; break;
- default: state = state_IGNORE;
- }
- break;
-
- case state_M10:
- state = (c == '8') ? state_M108 : state_IGNORE;
- break;
-
- case state_M11:
- state = (c == '2') ? state_M112 : state_IGNORE;
- break;
-
- case state_M4:
- state = (c == '1') ? state_M41 : state_IGNORE;
- break;
-
- case state_M41:
- state = (c == '0') ? state_M410 : state_IGNORE;
- break;
-
- case state_IGNORE:
- if (c == '\n') state = state_RESET;
- break;
-
- default:
- if (c == '\n') {
- switch (state) {
- case state_M108:
- wait_for_user = wait_for_heatup = false;
- break;
- case state_M112:
- killed_by_M112 = true;
- break;
- case state_M410:
- quickstop_stepper();
- break;
- default:
- break;
- }
- state = state_RESET;
- }
- }
- }
+ // This must read the M_UCSRxA register before reading the received byte to detect error causes
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ if (TEST(M_UCSRxA, M_DORx) && !++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
- #endif // EMERGENCY_PARSER
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ if (TEST(M_UCSRxA, M_DORx) && !++rx_buffer_overruns) --rx_buffer_overruns;
+ #endif
- FORCE_INLINE void store_rxd_char() {
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ if (TEST(M_UCSRxA, M_FEx) && !++rx_framing_errors) --rx_framing_errors;
+ #endif
- const ring_buffer_pos_t h = rx_buffer.head,
- i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // Read the character from the USART
+ uint8_t c = M_UDRx;
- // Read the character
- const uint8_t c = M_UDRx;
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, c);
+ #endif
// If the character is to be stored at the index just before the tail
- // (such that the head would advance to the current tail), the buffer is
- // critical, so don't write the character or advance the head.
- if (i != rx_buffer.tail) {
+ // (such that the head would advance to the current tail), the RX FIFO is
+ // full, so don't write the character or advance the head.
+ if (i != t) {
rx_buffer.buffer[h] = c;
- rx_buffer.head = i;
- }
- else {
- #if ENABLED(SERIAL_STATS_DROPPED_RX)
- if (!++rx_dropped_bytes) ++rx_dropped_bytes;
- #endif
+ h = i;
}
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ else if (!++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
- // calculate count of bytes stored into the RX buffer
- ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // Calculate count of bytes stored into the RX buffer
+ const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+
// Keep track of the maximum count of enqueued bytes
NOLESS(rx_max_enqueued, rx_count);
#endif
#if ENABLED(SERIAL_XON_XOFF)
-
- // for high speed transfers, we can use XON/XOFF protocol to do
- // software handshake and avoid overruns.
+ // If the last char that was sent was an XON
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
- // calculate count of bytes stored into the RX buffer
- ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // Bytes stored into the RX buffer
+ const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
- // if we are above 12.5% of RX buffer capacity, send XOFF before
- // we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
- // let the host react and stop sending bytes. This translates to 13mS
- // propagation time.
+ // If over 12.5% of RX buffer capacity, send XOFF before running out of
+ // RX buffer space .. 325 bytes @ 250kbits/s needed to let the host react
+ // and stop sending bytes. This translates to 13mS propagation time.
if (rx_count >= (RX_BUFFER_SIZE) / 8) {
- // If TX interrupts are disabled and data register is empty,
- // just write the byte to the data register and be done. This
- // shortcut helps significantly improve the effective datarate
- // at high (>500kbit/s) bitrates, where interrupt overhead
- // becomes a slowdown.
- if (!TEST(M_UCSRxB, M_UDRIEx) && TEST(M_UCSRxA, M_UDREx)) {
- // Send an XOFF character
- M_UDRx = XOFF_CHAR;
- // clear the TXC bit -- "can be cleared by writing a one to its bit
- // location". This makes sure flush() won't return until the bytes
- // actually got written
- SBI(M_UCSRxA, M_TXCx);
- // And remember it was sent
- xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
+
+ // At this point, definitely no TX interrupt was executing, since the TX ISR can't be preempted.
+ // Don't enable the TX interrupt here as a means to trigger the XOFF char, because if it happens
+ // to be in the middle of trying to disable the RX interrupt in the main program, eventually the
+ // enabling of the TX interrupt could be undone. The ONLY reliable thing this can do to ensure
+ // the sending of the XOFF char is to send it HERE AND NOW.
+
+ // About to send the XOFF char
+ xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
+
+ // Wait until the TX register becomes empty and send it - Here there could be a problem
+ // - While waiting for the TX register to empty, the RX register could receive a new
+ // character. This must also handle that situation!
+ while (!TEST(M_UCSRxA, M_UDREx)) {
+
+ if (TEST(M_UCSRxA,M_RXCx)) {
+ // A char arrived while waiting for the TX buffer to be empty - Receive and process it!
+
+ i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+
+ // Read the character from the USART
+ c = M_UDRx;
+
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, c);
+ #endif
+
+ // If the character is to be stored at the index just before the tail
+ // (such that the head would advance to the current tail), the FIFO is
+ // full, so don't write the character or advance the head.
+ if (i != t) {
+ rx_buffer.buffer[h] = c;
+ h = i;
+ }
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ else if (!++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
+ }
+ sw_barrier();
}
- else {
- // TX interrupts disabled, but buffer still not empty ... or
- // TX interrupts enabled. Reenable TX ints and schedule XOFF
- // character to be sent
- #if TX_BUFFER_SIZE > 0
- SBI(M_UCSRxB, M_UDRIEx);
- xon_xoff_state = XOFF_CHAR;
- #else
- // We are not using TX interrupts, we will have to send this manually
- while (!TEST(M_UCSRxA, M_UDREx)) { /* nada */ };
- M_UDRx = XOFF_CHAR;
- // And remember we already sent it
- xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
- #endif
+
+ M_UDRx = XOFF_CHAR;
+
+ // Clear the TXC bit -- "can be cleared by writing a one to its bit
+ // location". This makes sure flush() won't return until the bytes
+ // actually got written
+ SBI(M_UCSRxA, M_TXCx);
+
+ // At this point there could be a race condition between the write() function
+ // and this sending of the XOFF char. This interrupt could happen between the
+ // wait to be empty TX buffer loop and the actual write of the character. Since
+ // the TX buffer is full because it's sending the XOFF char, the only way to be
+ // sure the write() function will succeed is to wait for the XOFF char to be
+ // completely sent. Since an extra character could be received during the wait
+ // it must also be handled!
+ while (!TEST(M_UCSRxA, M_UDREx)) {
+
+ if (TEST(M_UCSRxA,M_RXCx)) {
+ // A char arrived while waiting for the TX buffer to be empty - Receive and process it!
+
+ i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+
+ // Read the character from the USART
+ c = M_UDRx;
+
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, c);
+ #endif
+
+ // If the character is to be stored at the index just before the tail
+ // (such that the head would advance to the current tail), the FIFO is
+ // full, so don't write the character or advance the head.
+ if (i != t) {
+ rx_buffer.buffer[h] = c;
+ h = i;
+ }
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ else if (!++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
+ }
+ sw_barrier();
}
+
+ // At this point everything is ready. The write() function won't
+ // have any issues writing to the UART TX register if it needs to!
}
}
#endif // SERIAL_XON_XOFF
- #if ENABLED(EMERGENCY_PARSER)
- emergency_parser(c);
- #endif
+ // Store the new head value - The main loop will retry until the value is stable
+ rx_buffer.head = h;
}
#if TX_BUFFER_SIZE > 0
+ // (called with TX irqs disabled)
FORCE_INLINE void _tx_udr_empty_irq(void) {
- // If interrupts are enabled, there must be more data in the output
- // buffer.
+
+ // Read positions
+ uint8_t t = tx_buffer.tail;
+ const uint8_t h = tx_buffer.head;
#if ENABLED(SERIAL_XON_XOFF)
- // Do a priority insertion of an XON/XOFF char, if needed.
- const uint8_t state = xon_xoff_state;
- if (!(state & XON_XOFF_CHAR_SENT)) {
- M_UDRx = state & XON_XOFF_CHAR_MASK;
- xon_xoff_state = state | XON_XOFF_CHAR_SENT;
+ // If an XON char is pending to be sent, do it now
+ if (xon_xoff_state == XON_CHAR) {
+
+ // Send the character
+ M_UDRx = XON_CHAR;
+
+ // clear the TXC bit -- "can be cleared by writing a one to its bit
+ // location". This makes sure flush() won't return until the bytes
+ // actually got written
+ SBI(M_UCSRxA, M_TXCx);
+
+ // Remember we sent it.
+ xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
+
+ // If nothing else to transmit, just disable TX interrupts.
+ if (h == t) CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
+
+ return;
}
- else
#endif
- { // Send the next byte
- const uint8_t t = tx_buffer.tail, c = tx_buffer.buffer[t];
- tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
- M_UDRx = c;
+
+ // If nothing to transmit, just disable TX interrupts. This could
+ // happen as the result of the non atomicity of the disabling of RX
+ // interrupts that could end reenabling TX interrupts as a side effect.
+ if (h == t) {
+ CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
+ return;
}
- // clear the TXC bit -- "can be cleared by writing a one to its bit
- // location". This makes sure flush() won't return until the bytes
- // actually got written
+ // There is something to TX, Send the next byte
+ const uint8_t c = tx_buffer.buffer[t];
+ t = (t + 1) & (TX_BUFFER_SIZE - 1);
+ M_UDRx = c;
+ tx_buffer.tail = t;
+
+ // Clear the TXC bit (by writing a one to its bit location).
+ // Ensures flush() won't return until the bytes are actually written/
SBI(M_UCSRxA, M_TXCx);
- // Disable interrupts if the buffer is empty
- if (tx_buffer.head == tx_buffer.tail)
- CBI(M_UCSRxB, M_UDRIEx);
+ // Disable interrupts if there is nothing to transmit following this byte
+ if (h == t) CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
}
#ifdef M_USARTx_UDRE_vect
@@ -325,8 +412,8 @@
SBI(M_UCSRxB, M_RXCIEx);
#if TX_BUFFER_SIZE > 0
CBI(M_UCSRxB, M_UDRIEx);
- _written = false;
#endif
+ _written = false;
}
void MarlinSerial::end() {
@@ -336,176 +423,179 @@
CBI(M_UCSRxB, M_UDRIEx);
}
- void MarlinSerial::checkRx(void) {
- if (TEST(M_UCSRxA, M_RXCx)) {
- CRITICAL_SECTION_START;
- store_rxd_char();
- CRITICAL_SECTION_END;
- }
- }
-
int MarlinSerial::peek(void) {
- CRITICAL_SECTION_START;
- const int v = rx_buffer.head == rx_buffer.tail ? -1 : rx_buffer.buffer[rx_buffer.tail];
- CRITICAL_SECTION_END;
- return v;
+ const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
+ return h == t ? -1 : rx_buffer.buffer[t];
}
int MarlinSerial::read(void) {
- int v;
- CRITICAL_SECTION_START;
- const ring_buffer_pos_t t = rx_buffer.tail;
- if (rx_buffer.head == t)
- v = -1;
- else {
- v = rx_buffer.buffer[t];
- rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
-
- #if ENABLED(SERIAL_XON_XOFF)
- if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
- // Get count of bytes in the RX buffer
- ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
- // When below 10% of RX buffer capacity, send XON before
- // running out of RX buffer bytes
- if (rx_count < (RX_BUFFER_SIZE) / 10) {
- xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
- CRITICAL_SECTION_END; // End critical section before returning!
- writeNoHandshake(XON_CHAR);
- return v;
- }
- }
- #endif
+ const ring_buffer_pos_t h = atomic_read_rx_head();
+
+ // Read the tail. Main thread owns it, so it is safe to directly read it
+ ring_buffer_pos_t t = rx_buffer.tail;
+
+ // If nothing to read, return now
+ if (h == t) return -1;
+
+ // Get the next char
+ const int v = rx_buffer.buffer[t];
+ t = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
+
+ // Advance tail - Making sure the RX ISR will always get an stable value, even
+ // if it interrupts the writing of the value of that variable in the middle.
+ atomic_set_rx_tail(t);
+
+ #if ENABLED(SERIAL_XON_XOFF)
+ // If the XOFF char was sent, or about to be sent...
+ if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
+ // Get count of bytes in the RX buffer
+ const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ if (rx_count < (RX_BUFFER_SIZE) / 10) {
+ #if TX_BUFFER_SIZE > 0
+ // Signal we want an XON character to be sent.
+ xon_xoff_state = XON_CHAR;
+ // Enable TX ISR. Non atomic, but it will eventually enable them
+ SBI(M_UCSRxB, M_UDRIEx);
+ #else
+ // If not using TX interrupts, we must send the XON char now
+ xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
+ while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
+ M_UDRx = XON_CHAR;
+ #endif
+ }
}
- CRITICAL_SECTION_END;
+ #endif
+
return v;
}
ring_buffer_pos_t MarlinSerial::available(void) {
- CRITICAL_SECTION_START;
- const ring_buffer_pos_t h = rx_buffer.head, t = rx_buffer.tail;
- CRITICAL_SECTION_END;
+ const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
return (ring_buffer_pos_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
}
void MarlinSerial::flush(void) {
- // Don't change this order of operations. If the RX interrupt occurs between
- // reading rx_buffer_head and updating rx_buffer_tail, the previous rx_buffer_head
- // may be written to rx_buffer_tail, making the buffer appear full rather than empty.
- CRITICAL_SECTION_START;
- rx_buffer.head = rx_buffer.tail = 0;
- clear_command_queue();
- CRITICAL_SECTION_END;
+
+ // Set the tail to the head:
+ // - Read the RX head index in a safe way. (See atomic_read_rx_head.)
+ // - Set the tail, making sure the RX ISR will always get a stable value, even
+ // if it interrupts the writing of the value of that variable in the middle.
+ atomic_set_rx_tail(atomic_read_rx_head());
#if ENABLED(SERIAL_XON_XOFF)
+ // If the XOFF char was sent, or about to be sent...
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
- xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
- writeNoHandshake(XON_CHAR);
+ #if TX_BUFFER_SIZE > 0
+ // Signal we want an XON character to be sent.
+ xon_xoff_state = XON_CHAR;
+ // Enable TX ISR. Non atomic, but it will eventually enable it.
+ SBI(M_UCSRxB, M_UDRIEx);
+ #else
+ // If not using TX interrupts, we must send the XON char now
+ xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
+ while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
+ M_UDRx = XON_CHAR;
+ #endif
}
#endif
}
#if TX_BUFFER_SIZE > 0
- uint8_t MarlinSerial::availableForWrite(void) {
- CRITICAL_SECTION_START;
- const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
- CRITICAL_SECTION_END;
- return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1);
- }
-
void MarlinSerial::write(const uint8_t c) {
- #if ENABLED(SERIAL_XON_XOFF)
- const uint8_t state = xon_xoff_state;
- if (!(state & XON_XOFF_CHAR_SENT)) {
- // Send 2 chars: XON/XOFF, then a user-specified char
- writeNoHandshake(state & XON_XOFF_CHAR_MASK);
- xon_xoff_state = state | XON_XOFF_CHAR_SENT;
- }
- #endif
- writeNoHandshake(c);
- }
-
- void MarlinSerial::writeNoHandshake(const uint8_t c) {
_written = true;
- CRITICAL_SECTION_START;
- bool emty = (tx_buffer.head == tx_buffer.tail);
- CRITICAL_SECTION_END;
- // If the buffer and the data register is empty, just write the byte
- // to the data register and be done. This shortcut helps
- // significantly improve the effective datarate at high (>
- // 500kbit/s) bitrates, where interrupt overhead becomes a slowdown.
- if (emty && TEST(M_UCSRxA, M_UDREx)) {
- CRITICAL_SECTION_START;
- M_UDRx = c;
- SBI(M_UCSRxA, M_TXCx);
- CRITICAL_SECTION_END;
+
+ // If the TX interrupts are disabled and the data register
+ // is empty, just write the byte to the data register and
+ // be done. This shortcut helps significantly improve the
+ // effective datarate at high (>500kbit/s) bitrates, where
+ // interrupt overhead becomes a slowdown.
+ // Yes, there is a race condition between the sending of the
+ // XOFF char at the RX ISR, but it is properly handled there
+ if (!TEST(M_UCSRxB, M_UDRIEx) && TEST(M_UCSRxA, M_UDREx)) {
+ M_UDRx = c;
+
+ // clear the TXC bit -- "can be cleared by writing a one to its bit
+ // location". This makes sure flush() won't return until the bytes
+ // actually got written
+ SBI(M_UCSRxA, M_TXCx);
return;
}
+
const uint8_t i = (tx_buffer.head + 1) & (TX_BUFFER_SIZE - 1);
- // If the output buffer is full, there's nothing for it other than to
- // wait for the interrupt handler to empty it a bit
- while (i == tx_buffer.tail) {
- if (!TEST(SREG, SREG_I)) {
- // Interrupts are disabled, so we'll have to poll the data
- // register empty flag ourselves. If it is set, pretend an
- // interrupt has happened and call the handler to free up
- // space for us.
- if (TEST(M_UCSRxA, M_UDREx))
- _tx_udr_empty_irq();
- }
- else {
- // nop, the interrupt handler will free up space for us
+ // If global interrupts are disabled (as the result of being called from an ISR)...
+ if (!ISRS_ENABLED()) {
+
+ // Make room by polling if it is possible to transmit, and do so!
+ while (i == tx_buffer.tail) {
+
+ // If we can transmit another byte, do it.
+ if (TEST(M_UCSRxA, M_UDREx)) _tx_udr_empty_irq();
+
+ // Make sure compiler rereads tx_buffer.tail
+ sw_barrier();
}
}
+ else {
+ // Interrupts are enabled, just wait until there is space
+ while (i == tx_buffer.tail) { sw_barrier(); }
+ }
+ // Store new char. head is always safe to move
tx_buffer.buffer[tx_buffer.head] = c;
- { CRITICAL_SECTION_START;
- tx_buffer.head = i;
- SBI(M_UCSRxB, M_UDRIEx);
- CRITICAL_SECTION_END;
- }
- return;
+ tx_buffer.head = i;
+
+ // Enable TX ISR - Non atomic, but it will eventually enable TX ISR
+ SBI(M_UCSRxB, M_UDRIEx);
}
void MarlinSerial::flushTX(void) {
- // TX
- // If we have never written a byte, no need to flush. This special
- // case is needed since there is no way to force the TXC (transmit
- // complete) bit to 1 during initialization
- if (!_written)
- return;
+ // No bytes written, no need to flush. This special case is needed since there's
+ // no way to force the TXC (transmit complete) bit to 1 during initialization.
+ if (!_written) return;
- while (TEST(M_UCSRxB, M_UDRIEx) || !TEST(M_UCSRxA, M_TXCx)) {
- if (!TEST(SREG, SREG_I) && TEST(M_UCSRxB, M_UDRIEx))
- // Interrupts are globally disabled, but the DR empty
- // interrupt should be enabled, so poll the DR empty flag to
- // prevent deadlock
+ // If global interrupts are disabled (as the result of being called from an ISR)...
+ if (!ISRS_ENABLED()) {
+
+ // Wait until everything was transmitted - We must do polling, as interrupts are disabled
+ while (tx_buffer.head != tx_buffer.tail || !TEST(M_UCSRxA, M_TXCx)) {
+
+ // If there is more space, send an extra character
if (TEST(M_UCSRxA, M_UDREx))
_tx_udr_empty_irq();
+
+ sw_barrier();
+ }
+
+ }
+ else {
+ // Wait until everything was transmitted
+ while (tx_buffer.head != tx_buffer.tail || !TEST(M_UCSRxA, M_TXCx)) sw_barrier();
}
- // If we get here, nothing is queued anymore (DRIE is disabled) and
- // the hardware finished tranmission (TXC is set).
+
+ // At this point nothing is queued anymore (DRIE is disabled) and
+ // the hardware finished transmission (TXC is set).
}
#else // TX_BUFFER_SIZE == 0
void MarlinSerial::write(const uint8_t c) {
- #if ENABLED(SERIAL_XON_XOFF)
- // Do a priority insertion of an XON/XOFF char, if needed.
- const uint8_t state = xon_xoff_state;
- if (!(state & XON_XOFF_CHAR_SENT)) {
- writeNoHandshake(state & XON_XOFF_CHAR_MASK);
- xon_xoff_state = state | XON_XOFF_CHAR_SENT;
- }
- #endif
- writeNoHandshake(c);
- }
-
- void MarlinSerial::writeNoHandshake(const uint8_t c) {
- while (!TEST(M_UCSRxA, M_UDREx)) { /* nada */ }
+ _written = true;
+ while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
M_UDRx = c;
}
+ void MarlinSerial::flushTX(void) {
+ // No bytes written, no need to flush. This special case is needed since there's
+ // no way to force the TXC (transmit complete) bit to 1 during initialization.
+ if (!_written) return;
+
+ // Wait until everything was transmitted
+ while (!TEST(M_UCSRxA, M_TXCx)) sw_barrier();
+
+ // At this point nothing is queued anymore (DRIE is disabled) and
+ // the hardware finished transmission (TXC is set).
+ }
#endif // TX_BUFFER_SIZE == 0
/**
@@ -529,13 +619,9 @@
}
void MarlinSerial::print(long n, int base) {
- if (base == 0)
- write(n);
+ if (base == 0) write(n);
else if (base == 10) {
- if (n < 0) {
- print('-');
- n = -n;
- }
+ if (n < 0) { print('-'); n = -n; }
printNumber(n, 10);
}
else
diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h
index 5e21535e4805..8c2b3f3186e5 100644
--- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h
+++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h
@@ -62,6 +62,9 @@
#define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,)
#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)
#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)
+#define M_FEx SERIAL_REGNAME(FE,SERIAL_PORT,)
+#define M_DORx SERIAL_REGNAME(DOR,SERIAL_PORT,)
+#define M_UPEx SERIAL_REGNAME(UPE,SERIAL_PORT,)
#define M_UDRIEx SERIAL_REGNAME(UDRIE,SERIAL_PORT,)
#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)
#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)
@@ -75,6 +78,7 @@
#define HEX 16
#define OCT 8
#define BIN 2
+#define BYTE 0
#ifndef USBCON
// We're using a ring buffer (I think), in which rx_buffer_head is the index of the
@@ -90,15 +94,19 @@
extern uint8_t rx_dropped_bytes;
#endif
- #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
- extern ring_buffer_pos_t rx_max_enqueued;
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ extern uint8_t rx_buffer_overruns;
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ extern uint8_t rx_framing_errors;
#endif
- #if ENABLED(EMERGENCY_PARSER)
- extern bool killed_by_M112;
+ #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
+ extern ring_buffer_pos_t rx_max_enqueued;
#endif
- class MarlinSerial { //: public Stream
+ class MarlinSerial {
public:
MarlinSerial() {};
@@ -108,18 +116,21 @@
static int read(void);
static void flush(void);
static ring_buffer_pos_t available(void);
- static void checkRx(void);
static void write(const uint8_t c);
- #if TX_BUFFER_SIZE > 0
- static uint8_t availableForWrite(void);
- static void flushTX(void);
- #endif
- static void writeNoHandshake(const uint8_t c);
+ static void flushTX(void);
#if ENABLED(SERIAL_STATS_DROPPED_RX)
FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
#endif
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ FORCE_INLINE static uint32_t buffer_overruns() { return rx_buffer_overruns; }
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ FORCE_INLINE static uint32_t framing_errors() { return rx_framing_errors; }
+ #endif
+
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
#endif
@@ -129,8 +140,8 @@
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
FORCE_INLINE static void print(const char* str) { write(str); }
- static void print(char, int = 0);
- static void print(unsigned char, int = 0);
+ static void print(char, int = BYTE);
+ static void print(unsigned char, int = BYTE);
static void print(int, int = DEC);
static void print(unsigned int, int = DEC);
static void print(long, int = DEC);
@@ -139,8 +150,8 @@
static void println(const String& s);
static void println(const char[]);
- static void println(char, int = 0);
- static void println(unsigned char, int = 0);
+ static void println(char, int = BYTE);
+ static void println(unsigned char, int = BYTE);
static void println(int, int = DEC);
static void println(unsigned int, int = DEC);
static void println(long, int = DEC);
diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/SanityCheck.h
similarity index 97%
rename from Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h
rename to Marlin/src/HAL/HAL_AVR/SanityCheck.h
index bcc8fb42ea3b..254da910c1e6 100644
--- a/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h
+++ b/Marlin/src/HAL/HAL_AVR/SanityCheck.h
@@ -99,7 +99,7 @@
/**
* TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
*/
-#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
+#if HAS_DRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
defined(X_HARDWARE_SERIAL ) \
|| defined(X2_HARDWARE_SERIAL) \
|| defined(Y_HARDWARE_SERIAL ) \
@@ -111,7 +111,7 @@
|| defined(E2_HARDWARE_SERIAL) \
|| defined(E3_HARDWARE_SERIAL) \
|| defined(E4_HARDWARE_SERIAL) )
- #error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
+ #error "Select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
#endif
#endif // _SANITYCHECK_AVR_8_BIT_H_
diff --git a/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h b/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
index 8bd6f0081d27..358b97f6ab4e 100644
--- a/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
@@ -24,7 +24,7 @@
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
- * the stepper-ISR via endstops.update(), most of the time finding no change.
+ * the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
@@ -40,6 +40,10 @@
#include "../../core/macros.h"
#include
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
/**
* Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
@@ -75,7 +79,7 @@
// Install Pin change interrupt for a pin. Can be called multiple times.
-void pciSetup(byte pin) {
+void pciSetup(const int8_t pin) {
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
@@ -84,19 +88,19 @@ void pciSetup(byte pin) {
// Handlers for pin change interrupts
#ifdef PCINT0_vect
- ISR(PCINT0_vect) { endstop_ISR_worker(); }
+ ISR(PCINT0_vect) { endstop_ISR(); }
#endif
#ifdef PCINT1_vect
- ISR(PCINT1_vect) { endstop_ISR_worker(); }
+ ISR(PCINT1_vect) { endstop_ISR(); }
#endif
#ifdef PCINT2_vect
- ISR(PCINT2_vect) { endstop_ISR_worker(); }
+ ISR(PCINT2_vect) { endstop_ISR(); }
#endif
#ifdef PCINT3_vect
- ISR(PCINT3_vect) { endstop_ISR_worker(); }
+ ISR(PCINT3_vect) { endstop_ISR(); }
#endif
void setup_endstop_interrupts( void ) {
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1280.h b/Marlin/src/HAL/HAL_AVR/fastio_1280.h
index 31c5b5edc654..1c65f2bde76f 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_1280.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_1280.h
@@ -23,8 +23,9 @@
/**
* Pin mapping for the 1280 and 2560
*
- * Logical Pin: 22 23 24 25 26 27 28 29 53 52 51 50 10 11 12 13 37 36 35 34 33 32 31 30 21 20 19 18 81 82 83 38 00 01 78 05 02 03 79 80 54 55 56 57 58 59 60 61 41 40 39 71 70 04 17 16 84 06 07 08 09 85 15 14 72 73 75 76 77 74 62 63 64 65 66 67 68 69 49 48 47 46 45 44 43 42
- * Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5 H0 H1 H2 H3 H4 H5 H6 H7 J0 J1 J2 J3 J4 J5 J6 J7 K0 K1 K2 K3 K4 K5 K6 K7 L0 L1 L2 L3 L4 L5 L6 L7
+ * Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100
+ * Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
+ * Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
*/
#ifndef _FASTIO_1280_H_
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h
index 70a46bad6357..a4e3c5d74de5 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h
@@ -36,7 +36,7 @@
#define AVR_ATmega1284_FAMILY (defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__))
#define AVR_ATmega2560_FAMILY (defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__))
#define AVR_ATmega2561_FAMILY (defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__))
-#define AVR_ATmega328_FAMILY (defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328p__))
+#define AVR_ATmega328_FAMILY (defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__))
/**
* Include Ports and Functions
@@ -52,7 +52,7 @@
#elif AVR_ATmega2561_FAMILY
#include "fastio_1281.h"
#else
- #error "Pins for this chip not defined in Arduino.h! If you have a working pins definition, please contribute!"
+ #error "No FastIO definition for the selected AVR Board."
#endif
/**
@@ -63,56 +63,50 @@
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
*/
-#define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))
+#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
-// On some boards pins > 0x100 are used. These are not converted to atomic actions. A critical section is needed.
+#define _WRITE_NC(IO,V) do{ \
+ if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
+ else CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
+}while(0)
-#define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)
+#define _WRITE_C(IO,V) do{ \
+ uint8_t port_bits = DIO ## IO ## _WPORT; /* Get a mask from the current port bits */ \
+ if (V) port_bits = ~port_bits; /* For setting bits, invert the mask */ \
+ DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \
+}while(0)
-#define _WRITE_C(IO, v) do { if (v) { \
- CRITICAL_SECTION_START; \
- {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } \
- CRITICAL_SECTION_END; \
- } \
- else { \
- CRITICAL_SECTION_START; \
- {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } \
- CRITICAL_SECTION_END; \
- } \
- } \
- while (0)
+#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)
-#define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)
+#define _TOGGLE(IO) (DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN))
-#define _TOGGLE(IO) do {DIO ## IO ## _RPORT ^= _BV(DIO ## IO ## _PIN); } while (0)
+#define _SET_INPUT(IO) CBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
+#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
-#define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0)
-#define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)
+#define _GET_INPUT(IO) !TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
+#define _GET_OUTPUT(IO) TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
+#define _GET_TIMER(IO) DIO ## IO ## _PWM
-#define _GET_INPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) == 0)
-#define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) != 0)
-#define _GET_TIMER(IO) (DIO ## IO ## _PWM)
+#define READ(IO) _READ(IO)
+#define WRITE(IO,V) _WRITE(IO,V)
+#define TOGGLE(IO) _TOGGLE(IO)
-#define READ(IO) _READ(IO)
-#define WRITE(IO,V) _WRITE(IO,V)
-#define TOGGLE(IO) _TOGGLE(IO)
+#define SET_INPUT(IO) _SET_INPUT(IO)
+#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
+#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
-#define SET_INPUT(IO) _SET_INPUT(IO)
-#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
-#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
+#define GET_INPUT(IO) _GET_INPUT(IO)
+#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
+#define GET_TIMER(IO) _GET_TIMER(IO)
-#define GET_INPUT(IO) _GET_INPUT(IO)
-#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
-#define GET_TIMER(IO) _GET_TIMER(IO)
-
-#define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)
+#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
/**
* Timer and Interrupt Control
*/
// Waveform Generation Modes
-typedef enum {
+enum WaveGenMode : char {
WGM_NORMAL, // 0
WGM_PWM_PC_8, // 1
WGM_PWM_PC_9, // 2
@@ -129,18 +123,18 @@ typedef enum {
WGM_reserved, // 13
WGM_FAST_PWM_ICRn, // 14 COM OCnA
WGM_FAST_PWM_OCRnA // 15 COM OCnA
-} WaveGenMode;
+};
// Compare Modes
-typedef enum {
+enum CompareMode : char {
COM_NORMAL, // 0
COM_TOGGLE, // 1 Non-PWM: OCnx ... Both PWM (WGM 9,11,14,15): OCnA only ... else NORMAL
COM_CLEAR_SET, // 2 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
COM_SET_CLEAR // 3 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
-} CompareMode;
+};
// Clock Sources
-typedef enum {
+enum ClockSource : char {
CS_NONE, // 0
CS_PRESCALER_1, // 1
CS_PRESCALER_8, // 2
@@ -149,10 +143,10 @@ typedef enum {
CS_PRESCALER_1024, // 5
CS_EXT_FALLING, // 6
CS_EXT_RISING // 7
-} ClockSource;
+};
// Clock Sources (Timer 2 only)
-typedef enum {
+enum ClockSource2 : char {
CS2_NONE, // 0
CS2_PRESCALER_1, // 1
CS2_PRESCALER_8, // 2
@@ -161,7 +155,7 @@ typedef enum {
CS2_PRESCALER_128, // 5
CS2_PRESCALER_256, // 6
CS2_PRESCALER_1024 // 7
-} ClockSource2;
+};
// Get interrupt bits in an orderly way
// Ex: cs = GET_CS(0); coma1 = GET_COM(A,1);
@@ -240,7 +234,7 @@ typedef enum {
* PWM availability macros
*/
-//find out which harware PWMs are already in use
+// Determine which harware PWMs are already in use
#if PIN_EXISTS(CONTROLLER_FAN)
#define PWM_CHK_FAN_B(p) (p == CONTROLLER_FAN_PIN || p == E0_AUTO_FAN_PIN || p == E1_AUTO_FAN_PIN || p == E2_AUTO_FAN_PIN || p == E3_AUTO_FAN_PIN || p == E4_AUTO_FAN_PIN || p == CHAMBER_AUTO_FAN_PIN)
#else
@@ -253,7 +247,7 @@ typedef enum {
#elif PIN_EXISTS(FAN1)
#define PWM_CHK_FAN_A(p) (p == FAN_PIN || p == FAN1_PIN)
#else
- #define PWM_CHK_FAN_A(p) p == FAN_PIN
+ #define PWM_CHK_FAN_A(p) (p == FAN_PIN)
#endif
#else
#define PWM_CHK_FAN_A(p) false
@@ -273,13 +267,13 @@ typedef enum {
#ifdef NUM_SERVOS
#if AVR_ATmega2560_FAMILY
- #define PWM_CHK_SERVO(p) ( p == 5 || NUM_SERVOS > 12 && p == 6 || NUM_SERVOS > 24 && p == 46) //PWMS 3A, 4A & 5A
+ #define PWM_CHK_SERVO(p) (p == 5 || (NUM_SERVOS > 12 && p == 6) || (NUM_SERVOS > 24 && p == 46)) // PWMS 3A, 4A & 5A
#elif AVR_ATmega2561_FAMILY
- #define PWM_CHK_SERVO(p) p == 5 //PWM3A
+ #define PWM_CHK_SERVO(p) (p == 5) // PWM3A
#elif AVR_ATmega1284_FAMILY
#define PWM_CHK_SERVO(p) false
#elif AVR_AT90USB1286_FAMILY
- #define PWM_CHK_SERVO(p) p == 16 //PWM3A
+ #define PWM_CHK_SERVO(p) (p == 16) // PWM3A
#elif AVR_ATmega328_FAMILY
#define PWM_CHK_SERVO(p) false
#endif
@@ -303,15 +297,15 @@ typedef enum {
// define which hardware PWMs are available for the current CPU
// all timer 1 PWMS deleted from this list because they are never available
#if AVR_ATmega2560_FAMILY
- #define PWM_PINS(p) ((p >= 2 && p <= 10 ) || p == 13 || p == 44 || p == 45 || p == 46 )
+ #define PWM_PINS(p) ((p >= 2 && p <= 10) || p == 13 || p == 44 || p == 45 || p == 46)
#elif AVR_ATmega2561_FAMILY
- #define PWM_PINS(p) ((p >= 2 && p <= 6 ) || p == 9)
+ #define PWM_PINS(p) ((p >= 2 && p <= 6) || p == 9)
#elif AVR_ATmega1284_FAMILY
- #define PWM_PINS(p) (p == 3 || p == 4 || p == 14 || p == 15)
+ #define PWM_PINS(p) (p == 3 || p == 4 || p == 14 || p == 15)
#elif AVR_AT90USB1286_FAMILY
- #define PWM_PINS(p) (p == 0 || p == 1 || p == 14 || p == 15 || p == 16 || p == 24)
+ #define PWM_PINS(p) (p == 0 || p == 1 || p == 14 || p == 15 || p == 16 || p == 24)
#elif AVR_ATmega328_FAMILY
- #define PWM_PINS(p) (p == 3 || p == 5 || p == 6 || p == 11)
+ #define PWM_PINS(p) (p == 3 || p == 5 || p == 6 || p == 11)
#else
#error "unknown CPU"
#endif
diff --git a/Marlin/src/HAL/HAL_AVR/math_AVR.h b/Marlin/src/HAL/HAL_AVR/math_AVR.h
index e0feab034f8e..6348ed8bbf9b 100644
--- a/Marlin/src/HAL/HAL_AVR/math_AVR.h
+++ b/Marlin/src/HAL/HAL_AVR/math_AVR.h
@@ -29,84 +29,89 @@
// intRes = longIn1 * longIn2 >> 24
// uses:
-// r26 to store 0
-// r27 to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result.
+// A[tmp] to store 0
+// B[tmp] to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result.
// note that the lower two bytes and the upper byte of the 48bit result are not calculated.
// this can cause the result to be out by one as the lower bytes may cause carries into the upper ones.
-// B0 A0 are bits 24-39 and are the returned value
-// C1 B1 A1 is longIn1
-// D2 C2 B2 A2 is longIn2
+// B A are bits 24-39 and are the returned value
+// C B A is longIn1
+// D C B A is longIn2
//
-#define MultiU24X32toH16(intRes, longIn1, longIn2) \
- asm volatile ( \
- "clr r26 \n\t" \
- "mul %A1, %B2 \n\t" \
- "mov r27, r1 \n\t" \
- "mul %B1, %C2 \n\t" \
- "movw %A0, r0 \n\t" \
- "mul %C1, %C2 \n\t" \
- "add %B0, r0 \n\t" \
- "mul %C1, %B2 \n\t" \
- "add %A0, r0 \n\t" \
- "adc %B0, r1 \n\t" \
- "mul %A1, %C2 \n\t" \
- "add r27, r0 \n\t" \
- "adc %A0, r1 \n\t" \
- "adc %B0, r26 \n\t" \
- "mul %B1, %B2 \n\t" \
- "add r27, r0 \n\t" \
- "adc %A0, r1 \n\t" \
- "adc %B0, r26 \n\t" \
- "mul %C1, %A2 \n\t" \
- "add r27, r0 \n\t" \
- "adc %A0, r1 \n\t" \
- "adc %B0, r26 \n\t" \
- "mul %B1, %A2 \n\t" \
- "add r27, r1 \n\t" \
- "adc %A0, r26 \n\t" \
- "adc %B0, r26 \n\t" \
- "lsr r27 \n\t" \
- "adc %A0, r26 \n\t" \
- "adc %B0, r26 \n\t" \
- "mul %D2, %A1 \n\t" \
- "add %A0, r0 \n\t" \
- "adc %B0, r1 \n\t" \
- "mul %D2, %B1 \n\t" \
- "add %B0, r0 \n\t" \
- "clr r1 \n\t" \
- : \
- "=&r" (intRes) \
- : \
- "d" (longIn1), \
- "d" (longIn2) \
- : \
- "r26" , "r27" \
- )
+static FORCE_INLINE uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2) {
+ register uint8_t tmp1;
+ register uint8_t tmp2;
+ register uint16_t intRes;
+ __asm__ __volatile__(
+ A("clr %[tmp1]")
+ A("mul %A[longIn1], %B[longIn2]")
+ A("mov %[tmp2], r1")
+ A("mul %B[longIn1], %C[longIn2]")
+ A("movw %A[intRes], r0")
+ A("mul %C[longIn1], %C[longIn2]")
+ A("add %B[intRes], r0")
+ A("mul %C[longIn1], %B[longIn2]")
+ A("add %A[intRes], r0")
+ A("adc %B[intRes], r1")
+ A("mul %A[longIn1], %C[longIn2]")
+ A("add %[tmp2], r0")
+ A("adc %A[intRes], r1")
+ A("adc %B[intRes], %[tmp1]")
+ A("mul %B[longIn1], %B[longIn2]")
+ A("add %[tmp2], r0")
+ A("adc %A[intRes], r1")
+ A("adc %B[intRes], %[tmp1]")
+ A("mul %C[longIn1], %A[longIn2]")
+ A("add %[tmp2], r0")
+ A("adc %A[intRes], r1")
+ A("adc %B[intRes], %[tmp1]")
+ A("mul %B[longIn1], %A[longIn2]")
+ A("add %[tmp2], r1")
+ A("adc %A[intRes], %[tmp1]")
+ A("adc %B[intRes], %[tmp1]")
+ A("lsr %[tmp2]")
+ A("adc %A[intRes], %[tmp1]")
+ A("adc %B[intRes], %[tmp1]")
+ A("mul %D[longIn2], %A[longIn1]")
+ A("add %A[intRes], r0")
+ A("adc %B[intRes], r1")
+ A("mul %D[longIn2], %B[longIn1]")
+ A("add %B[intRes], r0")
+ A("clr r1")
+ : [intRes] "=&r" (intRes),
+ [tmp1] "=&r" (tmp1),
+ [tmp2] "=&r" (tmp2)
+ : [longIn1] "d" (longIn1),
+ [longIn2] "d" (longIn2)
+ : "cc"
+ );
+ return intRes;
+}
// intRes = intIn1 * intIn2 >> 16
// uses:
// r26 to store 0
// r27 to store the byte 1 of the 24 bit result
-#define MultiU16X8toH16(intRes, charIn1, intIn2) \
- asm volatile ( \
- "clr r26 \n\t" \
- "mul %A1, %B2 \n\t" \
- "movw %A0, r0 \n\t" \
- "mul %A1, %A2 \n\t" \
- "add %A0, r1 \n\t" \
- "adc %B0, r26 \n\t" \
- "lsr r0 \n\t" \
- "adc %A0, r26 \n\t" \
- "adc %B0, r26 \n\t" \
- "clr r1 \n\t" \
- : \
- "=&r" (intRes) \
- : \
- "d" (charIn1), \
- "d" (intIn2) \
- : \
- "r26" \
- )
-
+static FORCE_INLINE uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
+ register uint8_t tmp;
+ register uint16_t intRes;
+ __asm__ __volatile__ (
+ A("clr %[tmp]")
+ A("mul %[charIn1], %B[intIn2]")
+ A("movw %A[intRes], r0")
+ A("mul %[charIn1], %A[intIn2]")
+ A("add %A[intRes], r1")
+ A("adc %B[intRes], %[tmp]")
+ A("lsr r0")
+ A("adc %A[intRes], %[tmp]")
+ A("adc %B[intRes], %[tmp]")
+ A("clr r1")
+ : [intRes] "=&r" (intRes),
+ [tmp] "=&r" (tmp)
+ : [charIn1] "d" (charIn1),
+ [intIn2] "d" (intIn2)
+ : "cc"
+ );
+ return intRes;
+}
#endif // _MATH_AVR_H_
diff --git a/Marlin/src/HAL/HAL_AVR/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_AVR/persistent_store_impl.cpp
index 9d5ddd1bd731..ef6fbeabd50d 100644
--- a/Marlin/src/HAL/HAL_AVR/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_AVR/persistent_store_impl.cpp
@@ -9,13 +9,8 @@
namespace HAL {
namespace PersistentStore {
-bool access_start() {
- return true;
-}
-
-bool access_finish(){
- return true;
-}
+bool access_start() { return true; }
+bool access_finish() { return true; }
bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
while (size--) {
diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/pinsDebug.h
similarity index 100%
rename from Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h
rename to Marlin/src/HAL/HAL_AVR/pinsDebug.h
diff --git a/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp b/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
index 0da95d040ec5..c02dd4c203b5 100644
--- a/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
+++ b/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
@@ -42,8 +42,8 @@
*
* write() - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.)
* writeMicroseconds() - Set the servo pulse width in microseconds.
- * move(pin, angle) - Sequence of attach(pin), write(angle), delay(SERVO_DELAY).
- * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after SERVO_DELAY.
+ * move(pin, angle) - Sequence of attach(pin), write(angle), safe_delay(servo_delay[servoIndex]).
+ * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after servo_delay[servoIndex].
* read() - Get the last-written servo pulse width as an angle between 0 and 180.
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
* attached() - Return true if a servo is attached.
diff --git a/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp b/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
index f6ee7363aac8..51064f9ba287 100644
--- a/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
@@ -22,10 +22,12 @@
#ifdef ARDUINO_ARCH_SAM
-#include "../../inc/MarlinConfig.h"
-#include "../../Marlin.h"
-#include "../../backtrace/unwinder.h"
-#include "../../backtrace/unwmemaccess.h"
+#include "../../core/macros.h"
+#include "../../core/serial.h"
+#include
+
+#include "../backtrace/unwinder.h"
+#include "../backtrace/unwmemaccess.h"
// Debug monitor that dumps to the Programming port all status when
// an exception or WDT timeout happens - And then resets the board
@@ -36,7 +38,7 @@
// state we are when running them
// A SW memory barrier, to ensure GCC does not overoptimize loops
-#define sw_barrier() asm volatile("": : :"memory");
+#define sw_barrier() __asm__ volatile("": : :"memory");
// (re)initialize UART0 as a monitor output to 250000,n,8,1
static void TXBegin(void) {
@@ -44,6 +46,11 @@ static void TXBegin(void) {
// Disable UART interrupt in NVIC
NVIC_DisableIRQ( UART_IRQn );
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
// Disable clock
pmc_disable_periph_clk( ID_UART );
@@ -66,7 +73,6 @@ static void TXBegin(void) {
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
}
-
// Send character through UART with no interrupts
static void TX(char c) {
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); };
@@ -230,107 +236,107 @@ void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause
__attribute__((naked)) void NMI_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#0 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#0")
+ A("b HardFault_HandlerC")
);
}
__attribute__((naked)) void HardFault_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#1 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#1")
+ A("b HardFault_HandlerC")
);
}
__attribute__((naked)) void MemManage_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#2 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#2")
+ A("b HardFault_HandlerC")
);
}
__attribute__((naked)) void BusFault_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#3 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#3")
+ A("b HardFault_HandlerC")
);
}
__attribute__((naked)) void UsageFault_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#4 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#4")
+ A("b HardFault_HandlerC")
);
}
__attribute__((naked)) void DebugMon_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#5 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#5")
+ A("b HardFault_HandlerC")
);
}
/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */
__attribute__((naked)) void WDT_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#6 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#6")
+ A("b HardFault_HandlerC")
);
}
__attribute__((naked)) void RSTC_Handler(void) {
__asm__ __volatile__ (
- ".syntax unified \n"
- " tst lr, #4 \n"
- " ite eq \n"
- " mrseq r0, msp \n"
- " mrsne r0, psp \n"
- " mov r1,lr \n"
- " mov r2,#7 \n"
- " b HardFault_HandlerC \n"
+ ".syntax unified" "\n\t"
+ A("tst lr, #4")
+ A("ite eq")
+ A("mrseq r0, msp")
+ A("mrsne r0, psp")
+ A("mov r1,lr")
+ A("mov r2,#7")
+ A("b HardFault_HandlerC")
);
}
-#endif
+#endif // ARDUINO_ARCH_SAM
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_Due.cpp b/Marlin/src/HAL/HAL_DUE/HAL.cpp
similarity index 99%
rename from Marlin/src/HAL/HAL_DUE/HAL_Due.cpp
rename to Marlin/src/HAL/HAL_DUE/HAL.cpp
index f53e7a122e76..9d932d94dbbd 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/HAL.cpp
@@ -29,7 +29,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include
#include "usb/usb_task.h"
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_Due.h b/Marlin/src/HAL/HAL_DUE/HAL.h
similarity index 93%
rename from Marlin/src/HAL/HAL_DUE/HAL_Due.h
rename to Marlin/src/HAL/HAL_DUE/HAL.h
index 4f574ecbd26d..c0f8141e5b8f 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/HAL.h
@@ -29,10 +29,14 @@
#ifndef _HAL_DUE_H
#define _HAL_DUE_H
+#define CPU_32_BIT
+
#include
#include
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
#include "fastio_Due.h"
#include "watchdog_Due.h"
#include "HAL_timers_Due.h"
@@ -51,8 +55,11 @@
#define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
#endif
-#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq();
-#define CRITICAL_SECTION_END if (!primask) __enable_irq();
+#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
+#define CRITICAL_SECTION_END if (!primask) __enable_irq()
+#define ISRS_ENABLED() (!__get_PRIMASK())
+#define ENABLE_ISRS() __enable_irq()
+#define DISABLE_ISRS() __disable_irq()
// On AVR this is in math.h?
#define square(x) ((x)*(x))
@@ -134,7 +141,8 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
inline void HAL_adc_init(void) {}//todo
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
-#define HAL_READ_ADC HAL_adc_result
+#define HAL_READ_ADC() HAL_adc_result
+#define HAL_ADC_READY() true
void HAL_adc_start_conversion(const uint8_t adc_pin);
uint16_t HAL_adc_get_result(void);
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp b/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
index 36aec941362e..84c0f8f4bf7e 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
@@ -42,6 +42,7 @@
// --------------------------------------------------------------------------
#include "../../inc/MarlinConfig.h"
+#include "../Delay.h"
// --------------------------------------------------------------------------
// Public Variables
@@ -58,66 +59,16 @@
// software SPI
// --------------------------------------------------------------------------
- // set optimization so ARDUINO optimizes this file
+ // Make sure GCC optimizes this file.
+ // Note that this line triggers a bug in GCC which is fixed by casting.
+ // See the note below.
#pragma GCC optimize (3)
- /* ---------------- Delay Cycles routine -------------- */
-
- /* https://blueprints.launchpad.net/gcc-arm-embedded/+spec/delay-cycles */
-
- #define nop() __asm__ __volatile__("nop;\n\t":::)
-
- FORCE_INLINE static void __delay_4cycles(uint32_t cy) { // +1 cycle
- #if ARCH_PIPELINE_RELOAD_CYCLES<2
- #define EXTRA_NOP_CYCLES "nop"
- #else
- #define EXTRA_NOP_CYCLES ""
- #endif
-
- __asm__ __volatile__(
- ".syntax unified" "\n\t" // is to prevent CM0,CM1 non-unified syntax
-
- "loop%=:" "\n\t"
- " subs %[cnt],#1" "\n\t"
- EXTRA_NOP_CYCLES "\n\t"
- " bne loop%=" "\n\t"
- : [cnt]"+r"(cy) // output: +r means input+output
- : // input:
- : "cc" // clobbers:
- );
- }
-
- FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
-
- if (__builtin_constant_p(x)) {
-
- #define MAXNOPS 4
-
- if (x <= (MAXNOPS)) {
- switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
- }
- else { // because of +1 cycle inside delay_4cycles
- const uint32_t rem = (x - 1) % (MAXNOPS);
- switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
- if ((x = (x - 1) / (MAXNOPS)))
- __delay_4cycles(x); // if need more then 4 nop loop is more optimal
- }
- }
- else
- __delay_4cycles(x / 4);
- }
-
- /* ---------------- Delay in nanoseconds and in microseconds */
-
- #define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000) / 1000)
-
- typedef uint8_t (*pfnSpiTransfer) (uint8_t b);
+ typedef uint8_t (*pfnSpiTransfer)(uint8_t b);
typedef void (*pfnSpiRxBlock)(uint8_t* buf, uint32_t nbyte);
typedef void (*pfnSpiTxBlock)(const uint8_t* buf, uint32_t nbyte);
-
/* ---------------- Macros to be able to access definitions from asm */
-
#define _PORT(IO) DIO ## IO ## _WPORT
#define _PIN_MASK(IO) MASK(DIO ## IO ## _PIN)
#define _PIN_SHIFT(IO) DIO ## IO ## _PIN
@@ -138,57 +89,57 @@
/* The software SPI routine */
__asm__ __volatile__(
- ".syntax unified" "\n\t" // is to prevent CM0,CM1 non-unified syntax
+ A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
/* Bit 7 */
- " ubfx %[idx],%[txval],#7,#1" "\n\t" /* Place bit 7 in bit 0 of idx*/
+ A("ubfx %[idx],%[txval],#7,#1") /* Place bit 7 in bit 0 of idx*/
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#6,#1" "\n\t" /* Place bit 6 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#6,#1") /* Place bit 6 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 6 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#5,#1" "\n\t" /* Place bit 5 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#5,#1") /* Place bit 5 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 5 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#4,#1" "\n\t" /* Place bit 4 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#4,#1") /* Place bit 4 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 4 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#3,#1" "\n\t" /* Place bit 3 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#3,#1") /* Place bit 3 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 3 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#2,#1" "\n\t" /* Place bit 2 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#2,#1") /* Place bit 2 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 2 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#1,#1" "\n\t" /* Place bit 1 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#1,#1") /* Place bit 1 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 1 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[idx],%[txval],#0,#1" "\n\t" /* Place bit 0 in bit 0 of idx*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[idx],%[txval],#0,#1") /* Place bit 0 in bit 0 of idx*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 0 */
- " str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " nop" "\n\t" /* Result will be 0 */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("nop") /* Result will be 0 */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
: [idx]"+r"( idx )
: [txval]"r"( bout ) ,
@@ -202,10 +153,10 @@
return 0;
}
- // Calculates the bit band alias address and returns a pointer address to word.
- // addr: The byte address of bitbanding bit.
- // bit: The bit position of bitbanding bit.
-#define BITBAND_ADDRESS(addr, bit) \
+ // Calculates the bit band alias address and returns a pointer address to word.
+ // addr: The byte address of bitbanding bit.
+ // bit: The bit position of bitbanding bit.
+ #define BITBAND_ADDRESS(addr, bit) \
(((uint32_t)(addr) & 0xF0000000) + 0x02000000 + ((uint32_t)(addr)&0xFFFFF)*32 + (bit)*4)
// run at ~8 .. ~10Mhz - Rx version (Tx line not altered)
@@ -219,55 +170,55 @@
/* The software SPI routine */
__asm__ __volatile__(
- ".syntax unified" "\n\t" // is to prevent CM0,CM1 non-unified syntax
+ A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
/* bit 7 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#7,#1" "\n\t" /* Store read bit as the bit 7 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#7,#1") /* Store read bit as the bit 7 */
/* bit 6 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#6,#1" "\n\t" /* Store read bit as the bit 6 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#6,#1") /* Store read bit as the bit 6 */
/* bit 5 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#5,#1" "\n\t" /* Store read bit as the bit 5 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#5,#1") /* Store read bit as the bit 5 */
/* bit 4 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#4,#1" "\n\t" /* Store read bit as the bit 4 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#4,#1") /* Store read bit as the bit 4 */
/* bit 3 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#3,#1" "\n\t" /* Store read bit as the bit 3 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#3,#1") /* Store read bit as the bit 3 */
/* bit 2 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#2,#1" "\n\t" /* Store read bit as the bit 2 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#2,#1") /* Store read bit as the bit 2 */
/* bit 1 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#1,#1" "\n\t" /* Store read bit as the bit 1 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#1,#1") /* Store read bit as the bit 1 */
/* bit 0 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#0,#1" "\n\t" /* Store read bit as the bit 0 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#0,#1") /* Store read bit as the bit 0 */
: [bin]"+r"(bin),
[work]"+r"(work)
@@ -319,8 +270,14 @@
}
// Pointers to generic functions for byte transfers
- static pfnSpiTransfer spiTransferTx = spiTransferX;
- static pfnSpiTransfer spiTransferRx = spiTransferX;
+
+ /**
+ * Note: The cast is unnecessary, but without it, this file triggers a GCC 4.8.3-2014 bug.
+ * Later GCC versions do not have this problem, but at this time (May 2018) Arduino still
+ * uses that buggy and obsolete GCC version!!
+ */
+ static pfnSpiTransfer spiTransferRx = (pfnSpiTransfer)spiTransferX;
+ static pfnSpiTransfer spiTransferTx = (pfnSpiTransfer)spiTransferX;
// Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) {
@@ -333,62 +290,62 @@
/* The software SPI routine */
__asm__ __volatile__(
- ".syntax unified" "\n\t" // is to prevent CM0,CM1 non-unified syntax
+ A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
- " loop%=:" "\n\t"
- " ldrb.w %[txval], [%[ptr]], #1" "\n\t" /* Load value to send, increment buffer */
- " mvn %[txval],%[txval]" "\n\t" /* Negate value */
+ L("loop%=")
+ A("ldrb.w %[txval], [%[ptr]], #1") /* Load value to send, increment buffer */
+ A("mvn %[txval],%[txval]") /* Negate value */
/* Bit 7 */
- " ubfx %[work],%[txval],#7,#1" "\n\t" /* Place bit 7 in bit 0 of work*/
+ A("ubfx %[work],%[txval],#7,#1") /* Place bit 7 in bit 0 of work*/
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#6,#1" "\n\t" /* Place bit 6 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#6,#1") /* Place bit 6 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 6 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#5,#1" "\n\t" /* Place bit 5 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#5,#1") /* Place bit 5 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 5 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#4,#1" "\n\t" /* Place bit 4 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#4,#1") /* Place bit 4 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 4 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#3,#1" "\n\t" /* Place bit 3 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#3,#1") /* Place bit 3 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 3 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#2,#1" "\n\t" /* Place bit 2 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#2,#1") /* Place bit 2 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 2 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#1,#1" "\n\t" /* Place bit 1 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#1,#1") /* Place bit 1 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 1 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ubfx %[work],%[txval],#0,#1" "\n\t" /* Place bit 0 in bit 0 of work*/
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ubfx %[work],%[txval],#0,#1") /* Place bit 0 in bit 0 of work*/
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
/* Bit 0 */
- " str %[mosi_mask],[%[mosi_port], %[work],LSL #2]" "\n\t" /* Access the proper SODR or CODR registers based on that bit */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " subs %[todo],#1" "\n\t" /* Decrement count of pending words to send, update status */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bne.n loop%=" "\n\t" /* Repeat until done */
+ A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("subs %[todo],#1") /* Decrement count of pending words to send, update status */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bne.n loop%=") /* Repeat until done */
: [ptr]"+r" ( ptr ) ,
[todo]"+r" ( todo ) ,
@@ -411,61 +368,61 @@
/* The software SPI routine */
__asm__ __volatile__(
- ".syntax unified" "\n\t" // is to prevent CM0,CM1 non-unified syntax
+ A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
- " loop%=:" "\n\t"
+ L("loop%=")
/* bit 7 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#7,#1" "\n\t" /* Store read bit as the bit 7 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#7,#1") /* Store read bit as the bit 7 */
/* bit 6 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#6,#1" "\n\t" /* Store read bit as the bit 6 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#6,#1") /* Store read bit as the bit 6 */
/* bit 5 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#5,#1" "\n\t" /* Store read bit as the bit 5 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#5,#1") /* Store read bit as the bit 5 */
/* bit 4 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#4,#1" "\n\t" /* Store read bit as the bit 4 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#4,#1") /* Store read bit as the bit 4 */
/* bit 3 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#3,#1" "\n\t" /* Store read bit as the bit 3 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#3,#1") /* Store read bit as the bit 3 */
/* bit 2 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#2,#1" "\n\t" /* Store read bit as the bit 2 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#2,#1") /* Store read bit as the bit 2 */
/* bit 1 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#1,#1" "\n\t" /* Store read bit as the bit 1 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#1,#1") /* Store read bit as the bit 1 */
/* bit 0 */
- " str %[sck_mask],[%[sck_port]]" "\n\t" /* SODR */
- " ldr %[work],[%[bitband_miso_port]]" "\n\t" /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
- " str %[sck_mask],[%[sck_port],#0x4]" "\n\t" /* CODR */
- " bfi %[bin],%[work],#0,#1" "\n\t" /* Store read bit as the bit 0 */
+ A("str %[sck_mask],[%[sck_port]]") /* SODR */
+ A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
+ A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
+ A("bfi %[bin],%[work],#0,#1") /* Store read bit as the bit 0 */
- " subs %[todo],#1" "\n\t" /* Decrement count of pending words to send, update status */
- " strb.w %[bin], [%[ptr]], #1" "\n\t" /* Store read value into buffer, increment buffer pointer */
- " bne.n loop%=" "\n\t" /* Repeat until done */
+ A("subs %[todo],#1") /* Decrement count of pending words to send, update status */
+ A("strb.w %[bin], [%[ptr]], #1") /* Store read value into buffer, increment buffer pointer */
+ A("bne.n loop%=") /* Repeat until done */
: [ptr]"+r"(ptr),
[todo]"+r"(todo),
@@ -491,8 +448,8 @@
}
// Pointers to generic functions for block tranfers
- static pfnSpiTxBlock spiTxBlock = spiTxBlockX;
- static pfnSpiRxBlock spiRxBlock = spiRxBlockX;
+ static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
+ static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
#if MB(ALLIGATOR) // control SDSS pin
void spiBegin() {
@@ -580,23 +537,23 @@
void spiInit(uint8_t spiRate) {
switch (spiRate) {
case 0:
- spiTransferTx = spiTransferTx0;
- spiTransferRx = spiTransferRx0;
- spiTxBlock = spiTxBlock0;
- spiRxBlock = spiRxBlock0;
+ spiTransferTx = (pfnSpiTransfer)spiTransferTx0;
+ spiTransferRx = (pfnSpiTransfer)spiTransferRx0;
+ spiTxBlock = (pfnSpiTxBlock)spiTxBlock0;
+ spiRxBlock = (pfnSpiRxBlock)spiRxBlock0;
break;
case 1:
- spiTransferTx = spiTransfer1;
- spiTransferRx = spiTransfer1;
- spiTxBlock = spiTxBlockX;
- spiRxBlock = spiRxBlockX;
+ spiTransferTx = (pfnSpiTransfer)spiTransfer1;
+ spiTransferRx = (pfnSpiTransfer)spiTransfer1;
+ spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
+ spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
break;
default:
spiDelayCyclesX4 = (F_CPU/1000000) >> (6 - spiRate);
- spiTransferTx = spiTransferX;
- spiTransferRx = spiTransferX;
- spiTxBlock = spiTxBlockX;
- spiRxBlock = spiRxBlockX;
+ spiTransferTx = (pfnSpiTransfer)spiTransferX;
+ spiTransferRx = (pfnSpiTransfer)spiTransferX;
+ spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
+ spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
break;
}
@@ -614,7 +571,7 @@
#pragma GCC reset_options
-#else
+#else // !SOFTWARE_SPI
#if MB(ALLIGATOR)
@@ -714,7 +671,7 @@
while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
// clear status
SPI0->SPI_RDR;
- //delayMicroseconds(1U);
+ //DELAY_US(1U);
}
void spiSend(const uint8_t* buf, size_t n) {
@@ -724,7 +681,7 @@
while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
SPI0->SPI_RDR;
- //delayMicroseconds(1U);
+ //DELAY_US(1U);
}
spiSend(buf[n - 1]);
}
@@ -767,7 +724,7 @@
// wait for receive register
while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
// get byte from receive register
- //delayMicroseconds(1U);
+ //DELAY_US(1U);
return SPI0->SPI_RDR;
}
@@ -797,7 +754,7 @@
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(SPI_CHAN);
while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
buf[i] = SPI0->SPI_RDR;
- //delayMicroseconds(1U);
+ //DELAY_US(1U);
}
buf[nbyte] = spiRec();
}
@@ -813,7 +770,7 @@
while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
SPI0->SPI_RDR;
- //delayMicroseconds(1U);
+ //DELAY_US(1U);
}
spiSend(buf[511]);
}
@@ -839,7 +796,7 @@
REG_PMC_PCER0 = (1UL << ID_PIOA) | (1UL << ID_SPI0);
// Disable PIO on A26 and A27
- REG_PIOA_PDR = 0x0c000000;
+ REG_PIOA_PDR = 0x0C000000;
OUT_WRITE(SDSS, 1);
// Reset SPI0 (from sam lib)
@@ -902,7 +859,7 @@
spiTransfer(buf[i]);
}
- #endif //MB(ALLIGATOR)
-#endif // ENABLED(SOFTWARE_SPI)
+ #endif // !ALLIGATOR
+#endif // !SOFTWARE_SPI
#endif // ARDUINO_ARCH_SAM
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
index 131318c159a5..eb23692b4479 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
@@ -32,7 +32,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include "HAL_timers_Due.h"
@@ -61,13 +61,13 @@
// --------------------------------------------------------------------------
const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
- { TC0, 0, TC0_IRQn, 0}, // 0 - [servo timer5]
+ { TC0, 0, TC0_IRQn, 3}, // 0 - [servo timer5]
{ TC0, 1, TC1_IRQn, 0}, // 1
{ TC0, 2, TC2_IRQn, 0}, // 2
{ TC1, 0, TC3_IRQn, 2}, // 3 - stepper
{ TC1, 1, TC4_IRQn, 15}, // 4 - temperature
- { TC1, 2, TC5_IRQn, 0}, // 5 - [servo timer3]
- { TC2, 0, TC6_IRQn, 15}, // 6 - tone
+ { TC1, 2, TC5_IRQn, 3}, // 5 - [servo timer3]
+ { TC2, 0, TC6_IRQn, 14}, // 6 - tone
{ TC2, 1, TC7_IRQn, 0}, // 7
{ TC2, 2, TC8_IRQn, 0}, // 8
};
@@ -99,6 +99,11 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
// Disable interrupt, just in case it was already enabled
NVIC_DisableIRQ(irq);
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
// Disable timer interrupt
tc->TC_CHANNEL[channel].TC_IDR = TC_IDR_CPCS;
@@ -126,30 +131,28 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
}
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
- const tTimerConfig * const pConfig = &TimerConfig[timer_num];
- pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_IER = TC_IER_CPCS;
+ IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
+ NVIC_EnableIRQ(irq);
}
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
- const tTimerConfig * const pConfig = &TimerConfig[timer_num];
- pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_IDR = TC_IDR_CPCS;
+ IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
+ NVIC_DisableIRQ(irq);
+
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
}
-bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
- const tTimerConfig * const pConfig = &TimerConfig[timer_num];
- return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_IER == TC_IER_CPCS;
+// missing from CMSIS: Check if interrupt is enabled or not
+static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
+ return (NVIC->ISER[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F))) != 0;
}
-#if 0
- void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
- const tTimerConfig * const pConfig = &TimerConfig[timer_num];
- TC_SetRC(pConfig->pTimerRegs, pConfig->channel, compare);
- }
-
- void HAL_timer_isr_prologue(const uint8_t timer_num) {
- const tTimerConfig * const pConfig = &TimerConfig[timer_num];
- TC_GetStatus(pConfig->pTimerRegs, pConfig->channel);
- }
-#endif
+bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
+ IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
+ return NVIC_GetEnabledIRQ(irq);
+}
#endif // ARDUINO_ARCH_SAM
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
index 2fbe4480fe06..871ef995e6d4 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
@@ -43,17 +43,22 @@
typedef uint32_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
+#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
+
#define STEP_TIMER_NUM 3 // index of timer to use for stepper
#define TEMP_TIMER_NUM 4 // index of timer to use for temperature
+#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
-#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
-#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / HAL_TICKS_PER_US)
-#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
-#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
-
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
-#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+
+#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
+
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
@@ -62,15 +67,10 @@ typedef uint32_t hal_timer_t;
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
-#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr) DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
-
#define HAL_STEP_TIMER_ISR void TC3_Handler()
#define HAL_TEMP_TIMER_ISR void TC4_Handler()
#define HAL_TONE_TIMER_ISR void TC6_Handler()
-#define PULSE_TIMER_NUM STEP_TIMER_NUM
-#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
-
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
@@ -119,12 +119,12 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
void HAL_timer_disable_interrupt(const uint8_t timer_num);
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
-//void HAL_timer_isr_prologue(const uint8_t timer_num);
-
FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
// Reading the status register clears the interrupt flag
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
}
+#define HAL_timer_isr_epilogue(TIMER_NUM)
+
#endif // _HAL_TIMERS_DUE_H
diff --git a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
index b10f06becc43..9b226a60da18 100644
--- a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
@@ -32,7 +32,7 @@
*/
#ifdef ARDUINO_ARCH_SAM
-#include "HAL_Due.h"
+#include "HAL.h"
#include "InterruptVectors_Due.h"
/* The relocated Exception/Interrupt Table - According to the ARM
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp b/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp
index dc8edf9a3a24..eed4c7399983 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp
@@ -33,6 +33,10 @@
#include "MarlinSerialUSB_Due.h"
+#if ENABLED(EMERGENCY_PARSER)
+ #include "../../feature/emergency_parser.h"
+#endif
+
// Imports from Atmel USB Stack/CDC implementation
extern "C" {
bool usb_task_cdc_isenabled(void);
@@ -46,6 +50,10 @@ extern "C" {
// Pending character
static int pending_char = -1;
+#if ENABLED(EMERGENCY_PARSER)
+ static EmergencyParser::State emergency_state; // = EP_RESET
+#endif
+
// Public Methods
void MarlinSerialUSB::begin(const long baud_setting) {
}
@@ -66,6 +74,11 @@ int MarlinSerialUSB::peek(void) {
return -1;
pending_char = udi_cdc_getc();
+
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, (char)pending_char);
+ #endif
+
return pending_char;
}
@@ -84,7 +97,13 @@ int MarlinSerialUSB::read(void) {
if (!udi_cdc_is_rx_ready())
return -1;
- return udi_cdc_getc();
+ int c = udi_cdc_getc();
+
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, (char)c);
+ #endif
+
+ return c;
}
bool MarlinSerialUSB::available(void) {
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
index 4d7aa945eff3..0ff98e62ffca 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
@@ -74,15 +74,14 @@
ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
#if TX_BUFFER_SIZE > 0
ring_buffer_t tx_buffer = { { 0 }, 0, 0 };
- static bool _written;
#endif
+ static bool _written;
#if ENABLED(SERIAL_XON_XOFF)
- constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80; // XON / XOFF Character was sent
- constexpr uint8_t XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
+ constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80, // XON / XOFF Character was sent
+ XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
// XON / XOFF character definitions
- constexpr uint8_t XON_CHAR = 17;
- constexpr uint8_t XOFF_CHAR = 19;
+ constexpr uint8_t XON_CHAR = 17, XOFF_CHAR = 19;
uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
// Validate that RX buffer size is at least 4096 bytes- According to several experiments, on
@@ -99,6 +98,14 @@
uint8_t rx_dropped_bytes = 0;
#endif
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ uint8_t rx_buffer_overruns = 0;
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ uint8_t rx_framing_errors = 0;
+ #endif
+
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
ring_buffer_pos_t rx_max_enqueued = 0;
#endif
@@ -107,215 +114,221 @@
#define sw_barrier() asm volatile("": : :"memory");
#if ENABLED(EMERGENCY_PARSER)
+ #include "../../feature/emergency_parser.h"
+ #endif
- bool killed_by_M112; // = false
-
- // Currently looking for: M108, M112, M410
- // If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
-
- FORCE_INLINE void emergency_parser(const uint8_t c) {
-
- static e_parser_state state = state_RESET;
+ // (called with RX interrupts disabled)
+ FORCE_INLINE void store_rxd_char() {
- switch (state) {
- case state_RESET:
- switch (c) {
- case ' ': break;
- case 'N': state = state_N; break;
- case 'M': state = state_M; break;
- default: state = state_IGNORE;
- }
- break;
-
- case state_N:
- switch (c) {
- case '0': case '1': case '2':
- case '3': case '4': case '5':
- case '6': case '7': case '8':
- case '9': case '-': case ' ': break;
- case 'M': state = state_M; break;
- default: state = state_IGNORE;
- }
- break;
-
- case state_M:
- switch (c) {
- case ' ': break;
- case '1': state = state_M1; break;
- case '4': state = state_M4; break;
- default: state = state_IGNORE;
- }
- break;
+ #if ENABLED(EMERGENCY_PARSER)
+ static EmergencyParser::State emergency_state; // = EP_RESET
+ #endif
- case state_M1:
- switch (c) {
- case '0': state = state_M10; break;
- case '1': state = state_M11; break;
- default: state = state_IGNORE;
- }
- break;
-
- case state_M10:
- state = (c == '8') ? state_M108 : state_IGNORE;
- break;
-
- case state_M11:
- state = (c == '2') ? state_M112 : state_IGNORE;
- break;
-
- case state_M4:
- state = (c == '1') ? state_M41 : state_IGNORE;
- break;
-
- case state_M41:
- state = (c == '0') ? state_M410 : state_IGNORE;
- break;
-
- case state_IGNORE:
- if (c == '\n') state = state_RESET;
- break;
-
- default:
- if (c == '\n') {
- switch (state) {
- case state_M108:
- wait_for_user = wait_for_heatup = false;
- break;
- case state_M112:
- killed_by_M112 = true;
- break;
- case state_M410:
- quickstop_stepper();
- break;
- default:
- break;
- }
- state = state_RESET;
- }
- }
- }
+ // Get the tail - Nothing can alter its value while we are at this ISR
+ const ring_buffer_pos_t t = rx_buffer.tail;
- #endif // EMERGENCY_PARSER
+ // Get the head pointer
+ ring_buffer_pos_t h = rx_buffer.head;
- FORCE_INLINE void store_rxd_char() {
+ // Get the next element
+ ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
- const ring_buffer_pos_t h = rx_buffer.head,
- i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // Read the character from the USART
+ uint8_t c = HWUART->UART_RHR;
- // Read the character
- const uint8_t c = HWUART->UART_RHR;
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, c);
+ #endif
// If the character is to be stored at the index just before the tail
- // (such that the head would advance to the current tail), the buffer is
- // critical, so don't write the character or advance the head.
- if (i != rx_buffer.tail) {
+ // (such that the head would advance to the current tail), the RX FIFO is
+ // full, so don't write the character or advance the head.
+ if (i != t) {
rx_buffer.buffer[h] = c;
- rx_buffer.head = i;
+ h = i;
}
#if ENABLED(SERIAL_STATS_DROPPED_RX)
- else if (!++rx_dropped_bytes) ++rx_dropped_bytes;
+ else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
- // calculate count of bytes stored into the RX buffer
- ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // Calculate count of bytes stored into the RX buffer
+
// Keep track of the maximum count of enqueued bytes
NOLESS(rx_max_enqueued, rx_count);
#endif
#if ENABLED(SERIAL_XON_XOFF)
-
- // for high speed transfers, we can use XON/XOFF protocol to do
- // software handshake and avoid overruns.
+ // If the last char that was sent was an XON
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
- // calculate count of bytes stored into the RX buffer
- ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // Bytes stored into the RX buffer
+ const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
- // if we are above 12.5% of RX buffer capacity, send XOFF before
- // we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
- // let the host react and stop sending bytes. This translates to 13mS
- // propagation time.
+ // If over 12.5% of RX buffer capacity, send XOFF before running out of
+ // RX buffer space .. 325 bytes @ 250kbits/s needed to let the host react
+ // and stop sending bytes. This translates to 13mS propagation time.
if (rx_count >= (RX_BUFFER_SIZE) / 8) {
- // If TX interrupts are disabled and data register is empty,
- // just write the byte to the data register and be done. This
- // shortcut helps significantly improve the effective datarate
- // at high (>500kbit/s) bitrates, where interrupt overhead
- // becomes a slowdown.
- if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
- // Send an XOFF character
- HWUART->UART_THR = XOFF_CHAR;
-
- // And remember it was sent
- xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
+
+ // At this point, definitely no TX interrupt was executing, since the TX isr can't be preempted.
+ // Don't enable the TX interrupt here as a means to trigger the XOFF char, because if it happens
+ // to be in the middle of trying to disable the RX interrupt in the main program, eventually the
+ // enabling of the TX interrupt could be undone. The ONLY reliable thing this can do to ensure
+ // the sending of the XOFF char is to send it HERE AND NOW.
+
+ // About to send the XOFF char
+ xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
+
+ // Wait until the TX register becomes empty and send it - Here there could be a problem
+ // - While waiting for the TX register to empty, the RX register could receive a new
+ // character. This must also handle that situation!
+ uint32_t status;
+ while (!((status = HWUART->UART_SR) & UART_SR_TXRDY)) {
+
+ if (status & UART_SR_RXRDY) {
+ // We received a char while waiting for the TX buffer to be empty - Receive and process it!
+
+ i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+
+ // Read the character from the USART
+ c = HWUART->UART_RHR;
+
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, c);
+ #endif
+
+ // If the character is to be stored at the index just before the tail
+ // (such that the head would advance to the current tail), the FIFO is
+ // full, so don't write the character or advance the head.
+ if (i != t) {
+ rx_buffer.buffer[h] = c;
+ h = i;
+ }
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ else if (!++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
+ }
+ sw_barrier();
}
- else {
- // TX interrupts disabled, but buffer still not empty ... or
- // TX interrupts enabled. Reenable TX ints and schedule XOFF
- // character to be sent
- #if TX_BUFFER_SIZE > 0
- HWUART->UART_IER = UART_IER_TXRDY;
- xon_xoff_state = XOFF_CHAR;
- #else
- // We are not using TX interrupts, we will have to send this manually
- while (!(HWUART->UART_SR & UART_SR_TXRDY)) { sw_barrier(); };
- HWUART->UART_THR = XOFF_CHAR;
- // And remember we already sent it
- xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
- #endif
+
+ HWUART->UART_THR = XOFF_CHAR;
+
+ // At this point there could be a race condition between the write() function
+ // and this sending of the XOFF char. This interrupt could happen between the
+ // wait to be empty TX buffer loop and the actual write of the character. Since
+ // the TX buffer is full because it's sending the XOFF char, the only way to be
+ // sure the write() function will succeed is to wait for the XOFF char to be
+ // completely sent. Since an extra character could be received during the wait
+ // it must also be handled!
+ while (!((status = HWUART->UART_SR) & UART_SR_TXRDY)) {
+
+ if (status & UART_SR_RXRDY) {
+ // A char arrived while waiting for the TX buffer to be empty - Receive and process it!
+
+ i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+
+ // Read the character from the USART
+ c = HWUART->UART_RHR;
+
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, c);
+ #endif
+
+ // If the character is to be stored at the index just before the tail
+ // (such that the head would advance to the current tail), the FIFO is
+ // full, so don't write the character or advance the head.
+ if (i != t) {
+ rx_buffer.buffer[h] = c;
+ h = i;
+ }
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ else if (!++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
+ }
+ sw_barrier();
}
+
+ // At this point everything is ready. The write() function won't
+ // have any issues writing to the UART TX register if it needs to!
}
}
#endif // SERIAL_XON_XOFF
- #if ENABLED(EMERGENCY_PARSER)
- emergency_parser(c);
- #endif
+ // Store the new head value
+ rx_buffer.head = h;
}
#if TX_BUFFER_SIZE > 0
FORCE_INLINE void _tx_thr_empty_irq(void) {
- // If interrupts are enabled, there must be more data in the output
- // buffer.
+ // Read positions
+ uint8_t t = tx_buffer.tail;
+ const uint8_t h = tx_buffer.head;
#if ENABLED(SERIAL_XON_XOFF)
- // Do a priority insertion of an XON/XOFF char, if needed.
- const uint8_t state = xon_xoff_state;
- if (!(state & XON_XOFF_CHAR_SENT)) {
- HWUART->UART_THR = state & XON_XOFF_CHAR_MASK;
- xon_xoff_state = state | XON_XOFF_CHAR_SENT;
+ // If an XON char is pending to be sent, do it now
+ if (xon_xoff_state == XON_CHAR) {
+
+ // Send the character
+ HWUART->UART_THR = XON_CHAR;
+
+ // Remember we sent it.
+ xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
+
+ // If nothing else to transmit, just disable TX interrupts.
+ if (h == t) HWUART->UART_IDR = UART_IDR_TXRDY;
+
+ return;
}
- else
#endif
- { // Send the next byte
- const uint8_t t = tx_buffer.tail, c = tx_buffer.buffer[t];
- tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
- HWUART->UART_THR = c;
- }
- // Disable interrupts if the buffer is empty
- if (tx_buffer.head == tx_buffer.tail)
+ // If nothing to transmit, just disable TX interrupts. This could
+ // happen as the result of the non atomicity of the disabling of RX
+ // interrupts that could end reenabling TX interrupts as a side effect.
+ if (h == t) {
HWUART->UART_IDR = UART_IDR_TXRDY;
+ return;
+ }
+
+ // There is something to TX, Send the next byte
+ const uint8_t c = tx_buffer.buffer[t];
+ t = (t + 1) & (TX_BUFFER_SIZE - 1);
+ HWUART->UART_THR = c;
+ tx_buffer.tail = t;
+
+ // Disable interrupts if there is nothing to transmit following this byte
+ if (h == t) HWUART->UART_IDR = UART_IDR_TXRDY;
}
#endif // TX_BUFFER_SIZE > 0
static void UART_ISR(void) {
- uint32_t status = HWUART->UART_SR;
+ const uint32_t status = HWUART->UART_SR;
- // Did we receive data?
- if (status & UART_SR_RXRDY)
- store_rxd_char();
+ // Data received?
+ if (status & UART_SR_RXRDY) store_rxd_char();
#if TX_BUFFER_SIZE > 0
- // Do we have something to send, and TX interrupts are enabled (meaning something to send) ?
- if ((status & UART_SR_TXRDY) && (HWUART->UART_IMR & UART_IMR_TXRDY))
- _tx_thr_empty_irq();
+ // Something to send, and TX interrupts are enabled (meaning something to send)?
+ if ((status & UART_SR_TXRDY) && (HWUART->UART_IMR & UART_IMR_TXRDY)) _tx_thr_empty_irq();
#endif
// Acknowledge errors
if ((status & UART_SR_OVRE) || (status & UART_SR_FRAME)) {
+
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ if (status & UART_SR_OVRE && !++rx_dropped_bytes) --rx_dropped_bytes;
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ if (status & UART_SR_OVRE && !++rx_buffer_overruns) --rx_buffer_overruns;
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ if (status & UART_SR_FRAME && !++rx_framing_errors) --rx_framing_errors;
+ #endif
+
// TODO: error reporting outside ISR
HWUART->UART_CR = UART_CR_RSTSTA;
}
@@ -328,6 +341,11 @@
// Disable UART interrupt in NVIC
NVIC_DisableIRQ( HWUART_IRQ );
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
// Disable clock
pmc_disable_periph_clk( HWUART_IRQ_ID );
@@ -353,6 +371,11 @@
// Install interrupt handler
install_isr(HWUART_IRQ, UART_ISR);
+ // Configure priority. We need a very high priority to avoid losing characters
+ // and we need to be able to preempt the Stepper ISR and everything else!
+ // (this could probably be fixed by using DMA with the Serial port)
+ NVIC_SetPriority(HWUART_IRQ, 1);
+
// Enable UART interrupt in NVIC
NVIC_EnableIRQ(HWUART_IRQ);
@@ -368,181 +391,178 @@
// Disable UART interrupt in NVIC
NVIC_DisableIRQ( HWUART_IRQ );
- pmc_disable_periph_clk( HWUART_IRQ_ID );
- }
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
- void MarlinSerial::checkRx(void) {
- if (HWUART->UART_SR & UART_SR_RXRDY) {
- CRITICAL_SECTION_START;
- store_rxd_char();
- CRITICAL_SECTION_END;
- }
+ pmc_disable_periph_clk( HWUART_IRQ_ID );
}
int MarlinSerial::peek(void) {
- CRITICAL_SECTION_START;
const int v = rx_buffer.head == rx_buffer.tail ? -1 : rx_buffer.buffer[rx_buffer.tail];
- CRITICAL_SECTION_END;
return v;
}
int MarlinSerial::read(void) {
- int v;
- CRITICAL_SECTION_START;
- const ring_buffer_pos_t t = rx_buffer.tail;
- if (rx_buffer.head == t)
- v = -1;
- else {
- v = rx_buffer.buffer[t];
- rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
- #if ENABLED(SERIAL_XON_XOFF)
- if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
- // Get count of bytes in the RX buffer
- ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
- // When below 10% of RX buffer capacity, send XON before
- // running out of RX buffer bytes
- if (rx_count < (RX_BUFFER_SIZE) / 10) {
+ const ring_buffer_pos_t h = rx_buffer.head;
+ ring_buffer_pos_t t = rx_buffer.tail;
+
+ if (h == t) return -1;
+
+ int v = rx_buffer.buffer[t];
+ t = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
+
+ // Advance tail
+ rx_buffer.tail = t;
+
+ #if ENABLED(SERIAL_XON_XOFF)
+ // If the XOFF char was sent, or about to be sent...
+ if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
+ // Get count of bytes in the RX buffer
+ const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
+ // When below 10% of RX buffer capacity, send XON before running out of RX buffer bytes
+ if (rx_count < (RX_BUFFER_SIZE) / 10) {
+ #if TX_BUFFER_SIZE > 0
+ // Signal we want an XON character to be sent.
+ xon_xoff_state = XON_CHAR;
+ // Enable TX isr.
+ HWUART->UART_IER = UART_IER_TXRDY;
+ #else
+ // If not using TX interrupts, we must send the XON char now
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
- CRITICAL_SECTION_END; // End critical section before returning!
- writeNoHandshake(XON_CHAR);
- return v;
- }
+ while (!(HWUART->UART_SR & UART_SR_TXRDY)) sw_barrier();
+ HWUART->UART_THR = XON_CHAR;
+ #endif
}
- #endif
- }
- CRITICAL_SECTION_END;
+ }
+ #endif
+
return v;
}
ring_buffer_pos_t MarlinSerial::available(void) {
- CRITICAL_SECTION_START;
const ring_buffer_pos_t h = rx_buffer.head, t = rx_buffer.tail;
- CRITICAL_SECTION_END;
return (ring_buffer_pos_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
}
void MarlinSerial::flush(void) {
- // Don't change this order of operations. If the RX interrupt occurs between
- // reading rx_buffer_head and updating rx_buffer_tail, the previous rx_buffer_head
- // may be written to rx_buffer_tail, making the buffer appear full rather than empty.
- CRITICAL_SECTION_START;
- rx_buffer.head = rx_buffer.tail;
- CRITICAL_SECTION_END;
+ rx_buffer.tail = rx_buffer.head;
#if ENABLED(SERIAL_XON_XOFF)
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
- xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
- writeNoHandshake(XON_CHAR);
+ #if TX_BUFFER_SIZE > 0
+ // Signal we want an XON character to be sent.
+ xon_xoff_state = XON_CHAR;
+ // Enable TX isr.
+ HWUART->UART_IER = UART_IER_TXRDY;
+ #else
+ // If not using TX interrupts, we must send the XON char now
+ xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
+ while (!(HWUART->UART_SR & UART_SR_TXRDY)) sw_barrier();
+ HWUART->UART_THR = XON_CHAR;
+ #endif
}
#endif
}
#if TX_BUFFER_SIZE > 0
-
- uint8_t MarlinSerial::availableForWrite(void) {
- CRITICAL_SECTION_START;
- const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
- CRITICAL_SECTION_END;
- return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1);
- }
-
void MarlinSerial::write(const uint8_t c) {
- #if ENABLED(SERIAL_XON_XOFF)
- const uint8_t state = xon_xoff_state;
- if (!(state & XON_XOFF_CHAR_SENT)) {
- // Send 2 chars: XON/XOFF, then a user-specified char
- writeNoHandshake(state & XON_XOFF_CHAR_MASK);
- xon_xoff_state = state | XON_XOFF_CHAR_SENT;
- }
- #endif
- writeNoHandshake(c);
- }
-
- void MarlinSerial::writeNoHandshake(const uint8_t c) {
_written = true;
- CRITICAL_SECTION_START;
- bool emty = (tx_buffer.head == tx_buffer.tail);
- CRITICAL_SECTION_END;
- // If the buffer and the data register is empty, just write the byte
- // to the data register and be done. This shortcut helps
- // significantly improve the effective datarate at high (>
- // 500kbit/s) bitrates, where interrupt overhead becomes a slowdown.
- if (emty && (HWUART->UART_SR & UART_SR_TXRDY)) {
- CRITICAL_SECTION_START;
- HWUART->UART_THR = c;
- HWUART->UART_IER = UART_IER_TXRDY;
- CRITICAL_SECTION_END;
+
+ // If the TX interrupts are disabled and the data register
+ // is empty, just write the byte to the data register and
+ // be done. This shortcut helps significantly improve the
+ // effective datarate at high (>500kbit/s) bitrates, where
+ // interrupt overhead becomes a slowdown.
+ // Yes, there is a race condition between the sending of the
+ // XOFF char at the RX isr, but it is properly handled there
+ if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
+ HWUART->UART_THR = c;
return;
}
+
const uint8_t i = (tx_buffer.head + 1) & (TX_BUFFER_SIZE - 1);
- // If the output buffer is full, there's nothing for it other than to
- // wait for the interrupt handler to empty it a bit
- while (i == tx_buffer.tail) {
- if (__get_PRIMASK()) {
- // Interrupts are disabled, so we'll have to poll the data
- // register empty flag ourselves. If it is set, pretend an
- // interrupt has happened and call the handler to free up
- // space for us.
- if (HWUART->UART_SR & UART_SR_TXRDY)
- _tx_thr_empty_irq();
- }
- else {
- // nop, the interrupt handler will free up space for us
+ // If global interrupts are disabled (as the result of being called from an ISR)...
+ if (!ISRS_ENABLED()) {
+
+ // Make room by polling if it is possible to transmit, and do so!
+ while (i == tx_buffer.tail) {
+ // If we can transmit another byte, do it.
+ if (HWUART->UART_SR & UART_SR_TXRDY) _tx_thr_empty_irq();
+ // Make sure compiler rereads tx_buffer.tail
+ sw_barrier();
}
- sw_barrier();
+ }
+ else {
+ // Interrupts are enabled, just wait until there is space
+ while (i == tx_buffer.tail) sw_barrier();
}
+ // Store new char. head is always safe to move
tx_buffer.buffer[tx_buffer.head] = c;
- { CRITICAL_SECTION_START;
- tx_buffer.head = i;
- HWUART->UART_IER = UART_IER_TXRDY;
- CRITICAL_SECTION_END;
- }
- return;
+ tx_buffer.head = i;
+
+ // Enable TX isr - Non atomic, but it will eventually enable TX isr
+ HWUART->UART_IER = UART_IER_TXRDY;
}
void MarlinSerial::flushTX(void) {
// TX
- // If we have never written a byte, no need to flush.
- if (!_written)
- return;
- while ((HWUART->UART_IMR & UART_IMR_TXRDY) || !(HWUART->UART_SR & UART_SR_TXEMPTY)) {
- if (__get_PRIMASK())
- if ((HWUART->UART_SR & UART_SR_TXRDY))
- _tx_thr_empty_irq();
- sw_barrier();
+ // If we have never written a byte, no need to flush. This special
+ // case is needed since there is no way to force the TXC (transmit
+ // complete) bit to 1 during initialization
+ if (!_written) return;
+
+ // If global interrupts are disabled (as the result of being called from an ISR)...
+ if (!ISRS_ENABLED()) {
+
+ // Wait until everything was transmitted - We must do polling, as interrupts are disabled
+ while (tx_buffer.head != tx_buffer.tail || !(HWUART->UART_SR & UART_SR_TXEMPTY)) {
+ // If there is more space, send an extra character
+ if (HWUART->UART_SR & UART_SR_TXRDY) _tx_thr_empty_irq();
+ sw_barrier();
+ }
+
+ }
+ else {
+ // Wait until everything was transmitted
+ while (tx_buffer.head != tx_buffer.tail || !(HWUART->UART_SR & UART_SR_TXEMPTY)) sw_barrier();
}
- // If we get here, nothing is queued anymore (TX interrupts are disabled) and
- // the hardware finished tranmission (TXEMPTY is set).
+
+ // At this point nothing is queued anymore (DRIE is disabled) and
+ // the hardware finished transmission (TXC is set).
}
#else // TX_BUFFER_SIZE == 0
void MarlinSerial::write(const uint8_t c) {
- #if ENABLED(SERIAL_XON_XOFF)
- // Do a priority insertion of an XON/XOFF char, if needed.
- const uint8_t state = xon_xoff_state;
- if (!(state & XON_XOFF_CHAR_SENT)) {
- writeNoHandshake(state & XON_XOFF_CHAR_MASK);
- xon_xoff_state = state | XON_XOFF_CHAR_SENT;
- }
- #endif
- writeNoHandshake(c);
- }
-
- void MarlinSerial::writeNoHandshake(const uint8_t c) {
- while (!(HWUART->UART_SR & UART_SR_TXRDY)) { sw_barrier(); };
+ _written = true;
+ while (!(HWUART->UART_SR & UART_SR_TXRDY)) sw_barrier();
HWUART->UART_THR = c;
}
+ void MarlinSerial::flushTX(void) {
+ // TX
+
+ // No bytes written, no need to flush. This special case is needed since there's
+ // no way to force the TXC (transmit complete) bit to 1 during initialization.
+ if (!_written) return;
+
+ // Wait until everything was transmitted
+ while (!(HWUART->UART_SR & UART_SR_TXEMPTY)) sw_barrier();
+
+ // At this point nothing is queued anymore (DRIE is disabled) and
+ // the hardware finished transmission (TXC is set).
+ }
#endif // TX_BUFFER_SIZE == 0
/**
- * Imports from print.h
- */
+ * Imports from print.h
+ */
void MarlinSerial::print(char c, int base) {
print((long)c, base);
@@ -561,13 +581,9 @@
}
void MarlinSerial::print(long n, int base) {
- if (base == 0)
- write(n);
+ if (base == 0) write(n);
else if (base == 10) {
- if (n < 0) {
- print('-');
- n = -n;
- }
+ if (n < 0) { print('-'); n = -n; }
printNumber(n, 10);
}
else
@@ -659,9 +675,7 @@
// Round correctly so that print(1.999, 2) prints as "2.00"
double rounding = 0.5;
- for (uint8_t i = 0; i < digits; ++i)
- rounding *= 0.1;
-
+ for (uint8_t i = 0; i < digits; ++i) rounding *= 0.1;
number += rounding;
// Extract the integer part of the number and print it
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
index 01dcd05d523b..2f5a07f515e4 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
@@ -70,12 +70,16 @@
extern uint8_t rx_dropped_bytes;
#endif
-#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
- extern ring_buffer_pos_t rx_max_enqueued;
+#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ extern uint8_t rx_buffer_overruns;
+#endif
+
+#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ extern uint8_t rx_framing_errors;
#endif
-#if ENABLED(EMERGENCY_PARSER)
- extern bool killed_by_M112;
+#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
+ extern ring_buffer_pos_t rx_max_enqueued;
#endif
class MarlinSerial {
@@ -88,18 +92,21 @@ class MarlinSerial {
static int read(void);
static void flush(void);
static ring_buffer_pos_t available(void);
- static void checkRx(void);
static void write(const uint8_t c);
- #if TX_BUFFER_SIZE > 0
- static uint8_t availableForWrite(void);
- static void flushTX(void);
- #endif
- static void writeNoHandshake(const uint8_t c);
+ static void flushTX(void);
#if ENABLED(SERIAL_STATS_DROPPED_RX)
FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
#endif
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ FORCE_INLINE static uint32_t buffer_overruns() { return rx_buffer_overruns; }
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ FORCE_INLINE static uint32_t framing_errors() { return rx_framing_errors; }
+ #endif
+
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
#endif
diff --git a/Marlin/src/HAL/HAL_DUE/SanityCheck_Due.h b/Marlin/src/HAL/HAL_DUE/SanityCheck.h
similarity index 97%
rename from Marlin/src/HAL/HAL_DUE/SanityCheck_Due.h
rename to Marlin/src/HAL/HAL_DUE/SanityCheck.h
index 16e07bd3b44f..f24233a859cb 100644
--- a/Marlin/src/HAL/HAL_DUE/SanityCheck_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/SanityCheck.h
@@ -41,7 +41,7 @@
*/
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
-#if ENABLED(SDSUPPORT) && ENABLED(HAVE_TMC2130)
+#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI)
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
diff --git a/Marlin/src/HAL/HAL_DUE/Tone.cpp b/Marlin/src/HAL/HAL_DUE/Tone.cpp
index c097e1e4caa6..55c03f5e584d 100644
--- a/Marlin/src/HAL/HAL_DUE/Tone.cpp
+++ b/Marlin/src/HAL/HAL_DUE/Tone.cpp
@@ -27,7 +27,7 @@
#ifdef ARDUINO_ARCH_SAM
-#include "HAL_Due.h"
+#include "HAL.h"
#include "HAL_timers_Due.h"
static pin_t tone_pin;
diff --git a/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h b/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
index 123519642a61..42cdba19fcae 100644
--- a/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
@@ -24,7 +24,7 @@
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
- * the stepper-ISR via endstops.update(), most of the time finding no change.
+ * the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
@@ -34,8 +34,13 @@
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
*/
- #ifndef _ENDSTOP_INTERRUPTS_H_
- #define _ENDSTOP_INTERRUPTS_H_
+#ifndef _ENDSTOP_INTERRUPTS_H_
+#define _ENDSTOP_INTERRUPTS_H_
+
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
/**
* Endstop interrupts for Due based targets.
diff --git a/Marlin/src/HAL/HAL_DUE/fastio_Due.h b/Marlin/src/HAL/HAL_DUE/fastio_Due.h
index e1d3fc7563a2..bb25f4517476 100644
--- a/Marlin/src/HAL/HAL_DUE/fastio_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/fastio_Due.h
@@ -39,6 +39,8 @@
#ifndef _FASTIO_DUE_H
#define _FASTIO_DUE_H
+#include
+
/**
* Utility functions
*/
@@ -48,7 +50,7 @@
#define USEABLE_HARDWARE_PWM(p) ((2 <= p) && (p <= 13))
#ifndef MASK
- #define MASK(PIN) (1 << PIN)
+ #define MASK(PIN) (1 << PIN)
#endif
/**
@@ -59,76 +61,70 @@
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
*/
-/// Read a pin
-#define _READ(IO) ((bool)(DIO ## IO ## _WPORT -> PIO_PDSR & (MASK(DIO ## IO ## _PIN))))
+// Read a pin
+#define _READ(IO) bool(DIO ## IO ## _WPORT -> PIO_PDSR & MASK(DIO ## IO ## _PIN))
-/// Write to a pin
-#define _WRITE_VAR(IO, v) do { \
- volatile Pio* port = g_APinDescription[IO].pPort; \
- uint32_t mask = g_APinDescription[IO].ulPin; \
- if (v) port->PIO_SODR = mask; \
+// Write to a pin
+#define _WRITE_VAR(IO,V) do { \
+ volatile Pio* port = digitalPinToPort(IO); \
+ uint32_t mask = digitalPinToBitMask(IO); \
+ if (V) port->PIO_SODR = mask; \
else port->PIO_CODR = mask; \
} while(0)
-/// Write to a pin
-#define _WRITE(IO, v) do { \
+// Write to a pin
+#define _WRITE(IO,V) do { \
volatile Pio* port = (DIO ## IO ## _WPORT); \
uint32_t mask = MASK(DIO ## IO ## _PIN); \
- if (v) port->PIO_SODR = mask; \
+ if (V) port->PIO_SODR = mask; \
else port->PIO_CODR = mask; \
} while(0)
-/// toggle a pin
-#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
-
-/// set pin as input
-#define _SET_INPUT(IO) do{ pmc_enable_periph_clk(g_APinDescription[IO].ulPeripheralId); \
- PIO_Configure(g_APinDescription[IO].pPort, PIO_INPUT, g_APinDescription[IO].ulPin, 0); \
- }while(0)
-/// set pin as output
-#define _SET_OUTPUT(IO) do{ pmc_enable_periph_clk(g_APinDescription[IO].ulPeripheralId); \
- PIO_Configure(g_APinDescription[IO].pPort, _READ(IO) ? PIO_OUTPUT_1 : PIO_OUTPUT_0, \
- g_APinDescription[IO].ulPin, g_APinDescription[IO].ulPinConfiguration); \
- g_pinStatus[IO] = (g_pinStatus[IO] & 0xF0) | PIN_STATUS_DIGITAL_OUTPUT;\
- }while(0)
+// Toggle a pin
+#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
-/// set pin as input with pullup mode
-#define _PULLUP(IO, v) { pinMode(IO, v != LOW ? INPUT_PULLUP : INPUT); }
+// Set pin as input
+#define _SET_INPUT(IO) do{ \
+ pmc_enable_periph_clk(g_APinDescription[IO].ulPeripheralId); \
+ PIO_Configure(digitalPinToPort(IO), PIO_INPUT, digitalPinToBitMask(IO), 0); \
+}while(0)
-/// check if pin is an input
-#define _GET_INPUT(IO)
-/// check if pin is an output
-#define _GET_OUTPUT(IO)
+// Set pin as output
+#define _SET_OUTPUT(IO) do{ \
+ pmc_enable_periph_clk(g_APinDescription[IO].ulPeripheralId); \
+ PIO_Configure(digitalPinToPort(IO), _READ(IO) ? PIO_OUTPUT_1 : PIO_OUTPUT_0, digitalPinToBitMask(IO), g_APinDescription[IO].ulPinConfiguration); \
+ g_pinStatus[IO] = (g_pinStatus[IO] & 0xF0) | PIN_STATUS_DIGITAL_OUTPUT;\
+}while(0)
-/// check if pin is a timer
-#define _GET_TIMER(IO)
+// Set pin as input with pullup mode
+#define _PULLUP(IO,V) pinMode(IO, (V) ? INPUT_PULLUP : INPUT)
-/// Read a pin wrapper
-#define READ(IO) _READ(IO)
+// Read a pin (wrapper)
+#define READ(IO) _READ(IO)
-/// Write to a pin wrapper
-#define WRITE_VAR(IO, v) _WRITE_VAR(IO, v)
-#define WRITE(IO, v) _WRITE(IO, v)
+// Write to a pin (wrapper)
+#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
+#define WRITE(IO,V) _WRITE(IO,V)
-/// toggle a pin wrapper
-#define TOGGLE(IO) _TOGGLE(IO)
+// Toggle a pin (wrapper)
+#define TOGGLE(IO) _TOGGLE(IO)
-/// set pin as input wrapper
-#define SET_INPUT(IO) _SET_INPUT(IO)
-/// set pin as input with pullup wrapper
+// Set pin as input (wrapper)
+#define SET_INPUT(IO) _SET_INPUT(IO)
+// Set pin as input with pullup (wrapper)
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
-/// set pin as output wrapper - reads the pin and sets the output to that value
-#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
-/// check if pin is an input wrapper
-#define GET_INPUT(IO) _GET_INPUT(IO)
-/// check if pin is an output wrapper
-#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
+// Set pin as output (wrapper) - reads the pin and sets the output to that value
+#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
-/// check if pin is a timer (wrapper)
-#define GET_TIMER(IO) _GET_TIMER(IO)
+// Check if pin is an input
+#define GET_INPUT(IO) !(digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO))
+// Check if pin is an output
+#define GET_OUTPUT(IO) !!(digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO))
+// Check if pin is a timer - Must be a constexpr
+#define GET_TIMER(IO) ((IO) >= 2 && (IO) <= 13)
// Shorthand
-#define OUT_WRITE(IO, v) { SET_OUTPUT(IO); WRITE(IO, v); }
+#define OUT_WRITE(IO,V) { SET_OUTPUT(IO); WRITE(IO,V); }
/**
* Ports and functions
diff --git a/Marlin/src/HAL/HAL_DUE/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_DUE/persistent_store_impl.cpp
index f5276e045c1d..aef1d79f48fc 100644
--- a/Marlin/src/HAL/HAL_DUE/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_DUE/persistent_store_impl.cpp
@@ -11,14 +11,12 @@ extern void eeprom_flush(void);
namespace HAL {
namespace PersistentStore {
-bool access_start() {
- return true;
-}
+bool access_start() { return true; }
-bool access_finish(){
-#if DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
- eeprom_flush();
-#endif
+bool access_finish() {
+ #if DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
+ eeprom_flush();
+ #endif
return true;
}
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h b/Marlin/src/HAL/HAL_DUE/pinsDebug.h
similarity index 100%
rename from Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h
rename to Marlin/src/HAL/HAL_DUE/pinsDebug.h
diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
index 98c065fba398..0dab3bb412f1 100644
--- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
+++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
@@ -56,108 +56,106 @@
*/
-
#ifdef __SAM3X8E__
-// #include
-
-// #include "src/core/macros.h"
-// #include "Configuration.h"
-#include "../../Marlin.h"
-#include "../../inc/MarlinConfig.h"
-
- #include
-
- #define SPI_FULL_SPEED 0
- #define SPI_HALF_SPEED 1
- #define SPI_QUARTER_SPEED 2
- #define SPI_EIGHTH_SPEED 3
- #define SPI_SIXTEENTH_SPEED 4
- #define SPI_SPEED_5 5
- #define SPI_SPEED_6 6
-
- void spiBegin();
- void spiInit(uint8_t spiRate);
- void spiSend(uint8_t b);
- void spiSend(const uint8_t* buf, size_t n);
+#include "../../inc/MarlinConfigPre.h"
- #include
- #include "../../core/macros.h"
- #include "fastio_Due.h"
+#if ENABLED(DOGLCD)
+#include
- void u8g_SetPIOutput_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index) {
- PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
- g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT
- }
-
- void u8g_SetPILevel_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
- volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort;
- uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin;
- if (level) port->PIO_SODR = mask;
- else port->PIO_CODR = mask;
- }
+#include "../../Marlin.h"
- uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)
+#define SPI_FULL_SPEED 0
+#define SPI_HALF_SPEED 1
+#define SPI_QUARTER_SPEED 2
+#define SPI_EIGHTH_SPEED 3
+#define SPI_SIXTEENTH_SPEED 4
+#define SPI_SPEED_5 5
+#define SPI_SPEED_6 6
+
+void spiBegin();
+void spiInit(uint8_t spiRate);
+void spiSend(uint8_t b);
+void spiSend(const uint8_t* buf, size_t n);
+
+#include
+#include "fastio_Due.h"
+
+void u8g_SetPIOutput_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index) {
+ PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
+ g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT
+}
+
+void u8g_SetPILevel_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
+ volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort;
+ uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin;
+ if (level) port->PIO_SODR = mask;
+ else port->PIO_CODR = mask;
+}
+
+uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)
+{
+ switch(msg)
{
- switch(msg)
- {
- case U8G_COM_MSG_STOP:
- break;
+ case U8G_COM_MSG_STOP:
+ break;
- case U8G_COM_MSG_INIT:
- u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_CS, 1);
- u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_A0, 1);
+ case U8G_COM_MSG_INIT:
+ u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_CS, 1);
+ u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_A0, 1);
- u8g_SetPIOutput_DUE_hw_spi(u8g, U8G_PI_CS);
- u8g_SetPIOutput_DUE_hw_spi(u8g, U8G_PI_A0);
+ u8g_SetPIOutput_DUE_hw_spi(u8g, U8G_PI_CS);
+ u8g_SetPIOutput_DUE_hw_spi(u8g, U8G_PI_A0);
- u8g_Delay(5);
+ u8g_Delay(5);
- spiBegin();
+ spiBegin();
- #ifndef SPI_SPEED
- #define SPI_SPEED SPI_FULL_SPEED // use same SPI speed as SD card
- #endif
- spiInit(2);
+ #ifndef SPI_SPEED
+ #define SPI_SPEED SPI_FULL_SPEED // use same SPI speed as SD card
+ #endif
+ spiInit(2);
- break;
+ break;
- case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
- u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_A0, arg_val);
- break;
+ case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
+ u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_A0, arg_val);
+ break;
- case U8G_COM_MSG_CHIP_SELECT:
- u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_CS, (arg_val ? 0 : 1));
- break;
+ case U8G_COM_MSG_CHIP_SELECT:
+ u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_CS, (arg_val ? 0 : 1));
+ break;
- case U8G_COM_MSG_RESET:
- break;
+ case U8G_COM_MSG_RESET:
+ break;
- case U8G_COM_MSG_WRITE_BYTE:
+ case U8G_COM_MSG_WRITE_BYTE:
- spiSend((uint8_t)arg_val);
- break;
+ spiSend((uint8_t)arg_val);
+ break;
- case U8G_COM_MSG_WRITE_SEQ: {
- uint8_t *ptr = (uint8_t*) arg_ptr;
- while (arg_val > 0) {
- spiSend(*ptr++);
- arg_val--;
- }
+ case U8G_COM_MSG_WRITE_SEQ: {
+ uint8_t *ptr = (uint8_t*) arg_ptr;
+ while (arg_val > 0) {
+ spiSend(*ptr++);
+ arg_val--;
}
- break;
-
- case U8G_COM_MSG_WRITE_SEQ_P: {
- uint8_t *ptr = (uint8_t*) arg_ptr;
- while (arg_val > 0) {
- spiSend(*ptr++);
- arg_val--;
- }
+ }
+ break;
+
+ case U8G_COM_MSG_WRITE_SEQ_P: {
+ uint8_t *ptr = (uint8_t*) arg_ptr;
+ while (arg_val > 0) {
+ spiSend(*ptr++);
+ arg_val--;
}
- break;
- }
- return 1;
+ }
+ break;
}
+ return 1;
+}
+
+#endif // DOGLCD
#endif //__SAM3X8E__
diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
index e5b674d4ebde..df33f9db626a 100644
--- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
+++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
@@ -55,9 +55,13 @@
#ifdef ARDUINO_ARCH_SAM
+#include "../../inc/MarlinConfigPre.h"
+
+#if ENABLED(DOGLCD)
+
#include
#include
-#include "../../core/macros.h"
+#include "../Delay.h"
void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) {
PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
@@ -71,30 +75,6 @@ void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
else port->PIO_CODR = mask;
}
-#define nop() __asm__ __volatile__("nop;\n\t":::)
-
-void __delay_4cycles(uint32_t cy) __attribute__ ((weak));
-
-FORCE_INLINE void __delay_4cycles(uint32_t cy) { // +1 cycle
- #if ARCH_PIPELINE_RELOAD_CYCLES<2
- #define EXTRA_NOP_CYCLES "nop"
- #else
- #define EXTRA_NOP_CYCLES ""
- #endif
-
- __asm__ __volatile__(
- ".syntax unified" "\n\t" // is to prevent CM0,CM1 non-unified syntax
-
- "loop%=:" "\n\t"
- " subs %[cnt],#1" "\n\t"
- EXTRA_NOP_CYCLES "\n\t"
- " bne loop%=" "\n\t"
- : [cnt]"+r"(cy) // output: +r means input+output
- : // input:
- : "cc" // clobbers:
- );
-}
-
Pio *SCK_pPio, *MOSI_pPio;
uint32_t SCK_dwMask, MOSI_dwMask;
@@ -104,9 +84,9 @@ static void spiSend_sw_DUE(uint8_t val) { // 800KHz
MOSI_pPio->PIO_SODR = MOSI_dwMask;
else
MOSI_pPio->PIO_CODR = MOSI_dwMask;
- __delay_4cycles(1);
+ DELAY_NS(48);
SCK_pPio->PIO_SODR = SCK_dwMask;
- __delay_4cycles(19); // 16 dead, 17 garbage, 18/0 900kHz, 19/1 825k, 20/1 800k, 21/2 725KHz
+ DELAY_NS(905); // 762 dead, 810 garbage, 858/0 900kHz, 905/1 825k, 953/1 800k, 1000/2 725KHz
val <<= 1;
SCK_pPio->PIO_CODR = SCK_dwMask;
}
@@ -122,16 +102,15 @@ static void u8g_com_DUE_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) {
if ( rs == 0 )
/* command */
- spiSend_sw_DUE(0x0f8);
+ spiSend_sw_DUE(0x0F8);
else
/* data */
- spiSend_sw_DUE(0x0fa);
+ spiSend_sw_DUE(0x0FA);
- for (i = 0; i < 4; i++) // give the controller some time to process the data
- u8g_10MicroDelay(); // 2 is bad, 3 is OK, 4 is safe
+ DELAY_US(40); // give the controller some time to process the data: 20 is bad, 30 is OK, 40 is safe
}
- spiSend_sw_DUE(val & 0x0f0);
+ spiSend_sw_DUE(val & 0x0F0);
spiSend_sw_DUE(val << 4);
}
@@ -201,4 +180,6 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
return 1;
}
-#endif //ARDUINO_ARCH_SAM
+#endif // DOGLCD
+
+#endif // ARDUINO_ARCH_SAM
diff --git a/Marlin/src/HAL/HAL_DUE/usb/compiler.h b/Marlin/src/HAL/HAL_DUE/usb/compiler.h
index efc895bb1117..43895381a227 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/compiler.h
+++ b/Marlin/src/HAL/HAL_DUE/usb/compiler.h
@@ -785,79 +785,6 @@ typedef struct
//! @}
-
-/*! \name Mathematics
- *
- * The same considerations as for clz and ctz apply here but GCC does not
- * provide built-in functions to access the assembly instructions abs, min and
- * max and it does not produce them by itself in most cases, so two sets of
- * macros are defined here:
- * - Abs, Min and Max to apply to constant expressions (values known at
- * compile time);
- * - abs, min and max to apply to non-constant expressions (values unknown at
- * compile time), abs is found in stdlib.h.
- */
-//! @{
-
-/*! \brief Takes the absolute value of \a a.
- *
- * \param a Input value.
- *
- * \return Absolute value of \a a.
- *
- * \note More optimized if only used with values known at compile time.
- */
-#define Abs(a) (((a) < 0 ) ? -(a) : (a))
-
-/*! \brief Takes the minimal value of \a a and \a b.
- *
- * \param a Input value.
- * \param b Input value.
- *
- * \return Minimal value of \a a and \a b.
- *
- * \note More optimized if only used with values known at compile time.
- */
-#define Min(a, b) (((a) < (b)) ? (a) : (b))
-
-/*! \brief Takes the maximal value of \a a and \a b.
- *
- * \param a Input value.
- * \param b Input value.
- *
- * \return Maximal value of \a a and \a b.
- *
- * \note More optimized if only used with values known at compile time.
- */
-#define Max(a, b) (((a) > (b)) ? (a) : (b))
-
-// abs() is already defined by stdlib.h
-
-/*! \brief Takes the minimal value of \a a and \a b.
- *
- * \param a Input value.
- * \param b Input value.
- *
- * \return Minimal value of \a a and \a b.
- *
- * \note More optimized if only used with values unknown at compile time.
- */
-#define min(a, b) Min(a, b)
-
-/*! \brief Takes the maximal value of \a a and \a b.
- *
- * \param a Input value.
- * \param b Input value.
- *
- * \return Maximal value of \a a and \a b.
- *
- * \note More optimized if only used with values unknown at compile time.
- */
-#define max(a, b) Max(a, b)
-
-//! @}
-
-
/*! \brief Calls the routine at address \a addr.
*
* It generates a long call opcode.
diff --git a/Marlin/src/HAL/HAL_DUE/usb/pll.h b/Marlin/src/HAL/HAL_DUE/usb/pll.h
index 88545eedf65a..d3d2174870e5 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/pll.h
+++ b/Marlin/src/HAL/HAL_DUE/usb/pll.h
@@ -74,7 +74,7 @@ extern "C" {
#define PLL_UPLL_HZ 480000000
-#define PLL_COUNT 0x3fU
+#define PLL_COUNT 0x3FU
enum pll_source {
PLL_SRC_MAINCK_4M_RC = OSC_MAINCK_4M_RC, //!< Internal 4MHz RC oscillator.
diff --git a/Marlin/src/HAL/HAL_DUE/usb/spc_protocol.h b/Marlin/src/HAL/HAL_DUE/usb/spc_protocol.h
index 84c4dd50a901..e5e7603c9a9e 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/spc_protocol.h
+++ b/Marlin/src/HAL/HAL_DUE/usb/spc_protocol.h
@@ -96,13 +96,13 @@ struct scsi_inquiry_data {
#define SCSI_INQ_DT_CD_DVD 0x05 //!< CD/DVD device
#define SCSI_INQ_DT_OPTICAL 0x07 //!< Optical Memory
#define SCSI_INQ_DT_MC 0x08 //!< Medium Changer
-#define SCSI_INQ_DT_ARRAY 0x0c //!< Storage Array Controller
-#define SCSI_INQ_DT_ENCLOSURE 0x0d //!< Enclosure Services
-#define SCSI_INQ_DT_RBC 0x0e //!< Simplified Direct Access
-#define SCSI_INQ_DT_OCRW 0x0f //!< Optical card reader/writer
+#define SCSI_INQ_DT_ARRAY 0x0C //!< Storage Array Controller
+#define SCSI_INQ_DT_ENCLOSURE 0x0D //!< Enclosure Services
+#define SCSI_INQ_DT_RBC 0x0E //!< Simplified Direct Access
+#define SCSI_INQ_DT_OCRW 0x0F //!< Optical card reader/writer
#define SCSI_INQ_DT_BCC 0x10 //!< Bridge Controller Commands
#define SCSI_INQ_DT_OSD 0x11 //!< Object-based Storage
-#define SCSI_INQ_DT_NONE 0x1f //!< No Peripheral
+#define SCSI_INQ_DT_NONE 0x1F //!< No Peripheral
uint8_t flags1; //!< Flags (byte 1)
#define SCSI_INQ_RMB 0x80 //!< Removable Medium
uint8_t version; //!< Version
@@ -213,17 +213,17 @@ enum scsi_sense_key {
SCSI_SK_DATA_PROTECT = 0x7,
SCSI_SK_BLANK_CHECK = 0x8,
SCSI_SK_VENDOR_SPECIFIC = 0x9,
- SCSI_SK_COPY_ABORTED = 0xa,
- SCSI_SK_ABORTED_COMMAND = 0xb,
- SCSI_SK_VOLUME_OVERFLOW = 0xd,
- SCSI_SK_MISCOMPARE = 0xe,
+ SCSI_SK_COPY_ABORTED = 0xA,
+ SCSI_SK_ABORTED_COMMAND = 0xB,
+ SCSI_SK_VOLUME_OVERFLOW = 0xD,
+ SCSI_SK_MISCOMPARE = 0xE,
};
/* Additional Sense Code / Additional Sense Code Qualifier pairs */
enum scsi_asc_ascq {
SCSI_ASC_NO_ADDITIONAL_SENSE_INFO = 0x0000,
SCSI_ASC_LU_NOT_READY_REBUILD_IN_PROGRESS = 0x0405,
- SCSI_ASC_WRITE_ERROR = 0x0c00,
+ SCSI_ASC_WRITE_ERROR = 0x0C00,
SCSI_ASC_UNRECOVERED_READ_ERROR = 0x1100,
SCSI_ASC_INVALID_COMMAND_OPERATION_CODE = 0x2000,
SCSI_ASC_INVALID_FIELD_IN_CDB = 0x2400,
@@ -242,7 +242,7 @@ enum scsi_asc_ascq {
enum scsi_spc_mode {
SCSI_MS_MODE_VENDOR_SPEC = 0x00,
SCSI_MS_MODE_INFEXP = 0x1C, // Informational exceptions control page
- SCSI_MS_MODE_ALL = 0x3f,
+ SCSI_MS_MODE_ALL = 0x3F,
};
/**
@@ -289,7 +289,7 @@ static inline bool scsi_mode_sense_dbd_is_set(const uint8_t * cdb)
static inline uint8_t scsi_mode_sense_get_page_code(const uint8_t * cdb)
{
- return cdb[2] & 0x3f;
+ return cdb[2] & 0x3F;
}
static inline uint8_t scsi_mode_sense_get_pc(const uint8_t * cdb)
diff --git a/Marlin/src/HAL/HAL_DUE/usb/udc.c b/Marlin/src/HAL/HAL_DUE/usb/udc.c
index a4521be83209..048a902d3b5e 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/udc.c
+++ b/Marlin/src/HAL/HAL_DUE/usb/udc.c
@@ -527,7 +527,7 @@ static bool udc_req_std_dev_set_feature(void)
if (!udd_is_high_speed()) {
break;
}
- if (udd_g_ctrlreq.req.wIndex & 0xff) {
+ if (udd_g_ctrlreq.req.wIndex & 0xFF) {
break;
}
// Unconfigure the device, terminating all ongoing requests
@@ -618,7 +618,7 @@ static bool udc_req_std_dev_get_str_desc(void)
uint8_t str_length = 0;
// Link payload pointer to the string corresponding at request
- switch (udd_g_ctrlreq.req.wValue & 0xff) {
+ switch (udd_g_ctrlreq.req.wValue & 0xFF) {
case 0:
udd_set_setup_payload((uint8_t *) &udc_string_desc_languageid,
sizeof(udc_string_desc_languageid));
@@ -674,7 +674,7 @@ static bool udc_req_std_dev_get_descriptor(void)
{
uint8_t conf_num;
- conf_num = udd_g_ctrlreq.req.wValue & 0xff;
+ conf_num = udd_g_ctrlreq.req.wValue & 0xFF;
// Check descriptor ID
switch ((uint8_t) (udd_g_ctrlreq.req.wValue >> 8)) {
diff --git a/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c b/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c
index fce050cf696a..0dfcd5ac1ff5 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c
+++ b/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.c
@@ -1904,7 +1904,7 @@ static void udd_ep_in_sent(udd_ep_id_t ep)
ptr_src = &ptr_job->buf[ptr_job->buf_cnt];
nb_remain = ptr_job->buf_size - ptr_job->buf_cnt;
// Fill a bank even if no data (ZLP)
- nb_data = min(nb_remain, pkt_size);
+ nb_data = MIN(nb_remain, pkt_size);
// Modify job information
ptr_job->buf_cnt += nb_data;
ptr_job->buf_load = nb_data;
diff --git a/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h b/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h
index 88e015ca37c2..1cd6914f8547 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h
+++ b/Marlin/src/HAL/HAL_DUE/usb/uotghs_device_due.h
@@ -217,7 +217,7 @@ extern "C" {
#define udd_raise_msof() (UOTGHS->UOTGHS_DEVIFR = UOTGHS_DEVIFR_MSOFS)
#define Is_udd_msof() (Tst_bits(UOTGHS->UOTGHS_DEVISR, UOTGHS_DEVISR_MSOF))
#define udd_micro_frame_number() \
- (Rd_bitfield(UOTGHS->UOTGHS_DEVFNUM, (UOTGHS_DEVFNUM_FNUM_Msk|UOTGHS_DEVFNUM_MFNUM_Msk)))
+ (Rd_bitfield(UOTGHS->UOTGHS_DEVFNUM, (UOTGHS_DEVFNUM_FNUM_Msk|UOTGHS_DEVFNUM_MFNUM_Msk)))
//! @}
//! Manage suspend event
@@ -266,10 +266,10 @@ extern "C" {
#define Is_udd_endpoint_enabled(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPEN0 << (ep)))
//! resets the selected endpoint
#define udd_reset_endpoint(ep) \
- do { \
- Set_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)); \
- Clr_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)); \
- } while (0)
+ do { \
+ Set_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)); \
+ Clr_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)); \
+ } while (0)
//! Tests if the selected endpoint is being reset
#define Is_udd_resetting_endpoint(ep) (Tst_bits(UOTGHS->UOTGHS_DEVEPT, UOTGHS_DEVEPT_EPRST0 << (ep)))
@@ -290,7 +290,8 @@ extern "C" {
//! Bounds given integer size to allowed range and rounds it up to the nearest
//! available greater size, then applies register format of UOTGHS controller
//! for endpoint size bit-field.
-#define udd_format_endpoint_size(size) (32 - clz(((uint32_t)min(max(size, 8), 1024) << 1) - 1) - 1 - 3)
+#undef udd_format_endpoint_size
+#define udd_format_endpoint_size(size) (32 - clz(((uint32_t)MIN(MAX(size, 8), 1024) << 1) - 1) - 1 - 3)
//! Configures the selected endpoint size
#define udd_configure_endpoint_size(ep, size) (Wr_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTCFG[0], ep), UOTGHS_DEVEPTCFG_EPSIZE_Msk, udd_format_endpoint_size(size)))
//! Gets the configured selected endpoint size
@@ -307,14 +308,14 @@ extern "C" {
//! Configures selected endpoint in one step
#define udd_configure_endpoint(ep, type, dir, size, bank) (\
- Wr_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTCFG[0], ep), UOTGHS_DEVEPTCFG_EPTYPE_Msk |\
- UOTGHS_DEVEPTCFG_EPDIR |\
- UOTGHS_DEVEPTCFG_EPSIZE_Msk |\
- UOTGHS_DEVEPTCFG_EPBK_Msk , \
- (((uint32_t)(type) << UOTGHS_DEVEPTCFG_EPTYPE_Pos) & UOTGHS_DEVEPTCFG_EPTYPE_Msk) |\
- (((uint32_t)(dir ) << UOTGHS_DEVEPTCFG_EPDIR_Pos ) & UOTGHS_DEVEPTCFG_EPDIR) |\
- ( (uint32_t)udd_format_endpoint_size(size) << UOTGHS_DEVEPTCFG_EPSIZE_Pos) |\
- (((uint32_t)(bank) << UOTGHS_DEVEPTCFG_EPBK_Pos) & UOTGHS_DEVEPTCFG_EPBK_Msk))\
+ Wr_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTCFG[0], ep), UOTGHS_DEVEPTCFG_EPTYPE_Msk |\
+ UOTGHS_DEVEPTCFG_EPDIR |\
+ UOTGHS_DEVEPTCFG_EPSIZE_Msk |\
+ UOTGHS_DEVEPTCFG_EPBK_Msk , \
+ (((uint32_t)(type) << UOTGHS_DEVEPTCFG_EPTYPE_Pos) & UOTGHS_DEVEPTCFG_EPTYPE_Msk) |\
+ (((uint32_t)(dir ) << UOTGHS_DEVEPTCFG_EPDIR_Pos ) & UOTGHS_DEVEPTCFG_EPDIR) |\
+ ( (uint32_t)udd_format_endpoint_size(size) << UOTGHS_DEVEPTCFG_EPSIZE_Pos) |\
+ (((uint32_t)(bank) << UOTGHS_DEVEPTCFG_EPBK_Pos) & UOTGHS_DEVEPTCFG_EPBK_Msk))\
)
//! Tests if current endpoint is configured
#define Is_udd_endpoint_configured(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_CFGOK))
@@ -540,7 +541,7 @@ extern "C" {
//! @warning It is up to the user of this macro to make sure that used HSB
//! addresses are identical to the DPRAM internal pointer modulo 32 bits.
#define udd_get_endpoint_fifo_access(ep, scale) \
- (((volatile TPASTE2(U, scale) (*)[0x8000 / ((scale) / 8)])UOTGHS_RAM_ADDR)[(ep)])
+ (((volatile TPASTE2(U, scale) (*)[0x8000 / ((scale) / 8)])UOTGHS_RAM_ADDR)[(ep)])
//! @name UOTGHS endpoint DMA drivers
//! These macros manage the common features of the endpoint DMA channels.
@@ -572,60 +573,60 @@ extern "C" {
//! @{
//! Structure for DMA next descriptor register
typedef struct {
- uint32_t *NXT_DSC_ADD;
+ uint32_t *NXT_DSC_ADD;
} uotghs_dma_nextdesc_t;
//! Structure for DMA control register
typedef struct {
- uint32_t CHANN_ENB:1,
- LDNXT_DSC:1,
- END_TR_EN:1,
- END_B_EN:1,
- END_TR_IT:1,
- END_BUFFIT:1,
- DESC_LD_IT:1,
- BUST_LCK:1,
- reserved:8,
- BUFF_LENGTH:16;
+ uint32_t CHANN_ENB:1,
+ LDNXT_DSC:1,
+ END_TR_EN:1,
+ END_B_EN:1,
+ END_TR_IT:1,
+ END_BUFFIT:1,
+ DESC_LD_IT:1,
+ BUST_LCK:1,
+ reserved:8,
+ BUFF_LENGTH:16;
} uotghs_dma_control_t;
//! Structure for DMA status register
typedef struct {
- uint32_t CHANN_ENB:1,
- CHANN_ACT:1,
- reserved0:2,
- END_TR_ST:1,
- END_BF_ST:1,
- DESC_LDST:1,
- reserved1:9,
- BUFF_COUNT:16;
+ uint32_t CHANN_ENB:1,
+ CHANN_ACT:1,
+ reserved0:2,
+ END_TR_ST:1,
+ END_BF_ST:1,
+ DESC_LDST:1,
+ reserved1:9,
+ BUFF_COUNT:16;
} uotghs_dma_status_t;
//! Structure for DMA descriptor
typedef struct {
- union {
- uint32_t nextdesc;
- uotghs_dma_nextdesc_t NEXTDESC;
- };
- uint32_t addr;
- union {
- uint32_t control;
- uotghs_dma_control_t CONTROL;
- };
- uint32_t reserved;
+ union {
+ uint32_t nextdesc;
+ uotghs_dma_nextdesc_t NEXTDESC;
+ };
+ uint32_t addr;
+ union {
+ uint32_t control;
+ uotghs_dma_control_t CONTROL;
+ };
+ uint32_t reserved;
} sam_uotghs_dmadesc_t, uotghs_dmadesc_t;
//! Structure for DMA registers in a channel
typedef struct {
- union {
- uint32_t nextdesc;
- uotghs_dma_nextdesc_t NEXTDESC;
- };
- uint32_t addr;
- union {
- uint32_t control;
- uotghs_dma_control_t CONTROL;
- };
- union {
- unsigned long status;
- uotghs_dma_status_t STATUS;
- };
+ union {
+ uint32_t nextdesc;
+ uotghs_dma_nextdesc_t NEXTDESC;
+ };
+ uint32_t addr;
+ union {
+ uint32_t control;
+ uotghs_dma_control_t CONTROL;
+ };
+ union {
+ unsigned long status;
+ uotghs_dma_status_t STATUS;
+ };
} sam_uotghs_dmach_t, uotghs_dmach_t;
//! DMA channel control command
#define UDD_ENDPOINT_DMA_STOP_NOW (0)
diff --git a/Marlin/src/HAL/HAL_DUE/usb/usb_protocol.h b/Marlin/src/HAL/HAL_DUE/usb/usb_protocol.h
index dd5071a5d375..31c783f974cf 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/usb_protocol.h
+++ b/Marlin/src/HAL/HAL_DUE/usb/usb_protocol.h
@@ -271,7 +271,7 @@ enum usb_langid {
/**
* \brief Mask selecting the index part of an endpoint address
*/
-#define USB_EP_ADDR_MASK 0x0f
+#define USB_EP_ADDR_MASK 0x0F
//! \brief USB address identifier
typedef uint8_t usb_add_t;
diff --git a/Marlin/src/HAL/HAL_DUE/usb/usb_task.c b/Marlin/src/HAL/HAL_DUE/usb/usb_task.c
index 528db591c394..c9de09c11347 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/usb_task.c
+++ b/Marlin/src/HAL/HAL_DUE/usb/usb_task.c
@@ -225,7 +225,7 @@ bool usb_task_extra_string(void) {
uint8_t str_lgt = 0;
// Link payload pointer to the string corresponding at request
- switch (udd_g_ctrlreq.req.wValue & 0xff) {
+ switch (udd_g_ctrlreq.req.wValue & 0xFF) {
case UDI_CDC_IAD_STRING_ID:
str_lgt = sizeof(udi_cdc_name) - 1;
str = udi_cdc_name;
diff --git a/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp b/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp
index 79081f43a2ff..3467fdd9422f 100644
--- a/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp
@@ -68,6 +68,11 @@ void watchdogSetup(void) {
// Disable WDT interrupt (just in case, to avoid triggering it!)
NVIC_DisableIRQ(WDT_IRQn);
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
// Initialize WDT with the given parameters
WDT_Enable(WDT, value);
diff --git a/Marlin/src/HAL/HAL_DUE/watchdog_Due.h b/Marlin/src/HAL/HAL_DUE/watchdog_Due.h
index be8afd2e81e5..57120309a3a3 100644
--- a/Marlin/src/HAL/HAL_DUE/watchdog_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/watchdog_Due.h
@@ -25,7 +25,7 @@
// Arduino Due core now has watchdog support
-#include "../HAL.h"
+#include "HAL.h"
// Initialize watchdog with a 4 second interrupt time
void watchdog_init();
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.cpp b/Marlin/src/HAL/HAL_ESP32/HAL.cpp
new file mode 100644
index 000000000000..f928d635f79f
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/HAL.cpp
@@ -0,0 +1,155 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifdef ARDUINO_ARCH_ESP32
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "HAL.h"
+#include
+#include
+#include
+
+#include "../../inc/MarlinConfigPre.h"
+
+#if ENABLED(WIFISUPPORT)
+ #include "ota.h"
+#endif
+
+// --------------------------------------------------------------------------
+// Externals
+// --------------------------------------------------------------------------
+
+portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
+
+// --------------------------------------------------------------------------
+// Local defines
+// --------------------------------------------------------------------------
+
+#define V_REF 1100
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+uint16_t HAL_adc_result;
+
+// --------------------------------------------------------------------------
+// Private Variables
+// --------------------------------------------------------------------------
+
+esp_adc_cal_characteristics_t characteristics;
+
+// --------------------------------------------------------------------------
+// Function prototypes
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private functions
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+void HAL_init(void) {
+ #if ENABLED(WIFISUPPORT)
+ OTA_init();
+ #endif
+}
+
+void HAL_idletask(void) {
+ #if ENABLED(WIFISUPPORT)
+ OTA_handle();
+ #endif
+}
+
+void HAL_clear_reset_source(void) { }
+
+uint8_t HAL_get_reset_source (void) {
+ return rtc_get_reset_reason(1);
+}
+
+void _delay_ms(int delay_ms) {
+ delay(delay_ms);
+}
+
+// return free memory between end of heap (or end bss) and whatever is current
+int freeMemory() {
+ return ESP.getFreeHeap();
+}
+
+// --------------------------------------------------------------------------
+// ADC
+// --------------------------------------------------------------------------
+#define ADC1_CHANNEL(pin) ADC1_GPIO##pin_CHANNEL
+
+adc1_channel_t get_channel(int pin) {
+ switch (pin) {
+ case 36: return ADC1_GPIO36_CHANNEL;
+ case 39: return ADC1_GPIO39_CHANNEL;
+ }
+
+ return ADC1_CHANNEL_MAX;
+}
+
+void HAL_adc_init() {
+ // Configure ADC
+ adc1_config_width(ADC_WIDTH_12Bit);
+ adc1_config_channel_atten(get_channel(36), ADC_ATTEN_11db);
+ adc1_config_channel_atten(get_channel(39), ADC_ATTEN_11db);
+
+ // Calculate ADC characteristics i.e. gain and offset factors
+ esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, V_REF, &characteristics);
+}
+
+void HAL_adc_start_conversion (uint8_t adc_pin) {
+ uint32_t mv;
+ esp_adc_cal_get_voltage((adc_channel_t)get_channel(adc_pin), &characteristics, &mv);
+
+ HAL_adc_result = mv*1023.0/3300.0;
+}
+
+int pin_to_channel[40] = {};
+int cnt_channel = 1;
+void analogWrite(int pin, int value) {
+ if (pin_to_channel[pin] == 0) {
+ ledcAttachPin(pin, cnt_channel);
+ ledcSetup(cnt_channel, 490, 8);
+ ledcWrite(cnt_channel, value);
+
+ pin_to_channel[pin] = cnt_channel++;
+ }
+
+ ledcWrite(pin_to_channel[pin], value);
+}
+#endif // ARDUINO_ARCH_ESP32
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.h b/Marlin/src/HAL/HAL_ESP32/HAL.h
new file mode 100644
index 000000000000..28e75b332e6f
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/HAL.h
@@ -0,0 +1,127 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * Description: HAL for Espressif ESP32 WiFi
+ */
+
+#ifndef _HAL_ESP32_H
+#define _HAL_ESP32_H
+
+#define CPU_32_BIT
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include
+
+#undef DISABLED
+#undef _BV
+
+#include
+
+#undef DISABLED
+#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
+
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
+
+#include "fastio_ESP32.h"
+#include "watchdog_ESP32.h"
+
+#include "HAL_timers_ESP32.h"
+
+// --------------------------------------------------------------------------
+// Defines
+// --------------------------------------------------------------------------
+
+extern portMUX_TYPE spinlock;
+
+#define NUM_SERIAL 1
+#define MYSERIAL0 Serial
+
+#define CRITICAL_SECTION_START portENTER_CRITICAL(&spinlock)
+#define CRITICAL_SECTION_END portEXIT_CRITICAL(&spinlock)
+#define ISRS_ENABLED() (spinlock.owner == portMUX_FREE_VAL)
+#define ENABLE_ISRS() if (spinlock.owner != portMUX_FREE_VAL) portEXIT_CRITICAL(&spinlock)
+#define DISABLE_ISRS() portENTER_CRITICAL(&spinlock)
+
+
+// Fix bug in pgm_read_ptr
+#undef pgm_read_ptr
+#define pgm_read_ptr(addr) (*(addr))
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+typedef int16_t pin_t;
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+/** result of last ADC conversion */
+extern uint16_t HAL_adc_result;
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+// clear reset reason
+void HAL_clear_reset_source (void);
+
+// reset reason
+uint8_t HAL_get_reset_source (void);
+
+void _delay_ms(int delay);
+
+int freeMemory(void);
+
+void analogWrite(int pin, int value);
+
+// EEPROM
+void eeprom_write_byte(unsigned char *pos, unsigned char value);
+unsigned char eeprom_read_byte(unsigned char *pos);
+void eeprom_read_block (void *__dst, const void *__src, size_t __n);
+void eeprom_update_block (const void *__src, void *__dst, size_t __n);
+
+// ADC
+#define HAL_ANALOG_SELECT(pin)
+
+void HAL_adc_init(void);
+
+#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
+#define HAL_READ_ADC() HAL_adc_result
+#define HAL_ADC_READY() true
+
+void HAL_adc_start_conversion (uint8_t adc_pin);
+
+#define GET_PIN_MAP_PIN(index) index
+#define GET_PIN_MAP_INDEX(pin) pin
+#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
+
+// Enable hooks into idle and setup for HAL
+#define HAL_IDLETASK 1
+#define HAL_INIT 1
+void HAL_idletask(void);
+void HAL_init(void);
+
+#endif // _HAL_ESP32_H
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
new file mode 100644
index 000000000000..e59e1f90de7e
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
@@ -0,0 +1,109 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (C) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifdef ARDUINO_ARCH_ESP32
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "HAL.h"
+#include "../HAL_SPI.h"
+#include "pins_arduino.h"
+#include "spi_pins.h"
+#include "../../core/macros.h"
+#include
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+static SPISettings spiConfig;
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Hardware SPI
+// --------------------------------------------------------------------------
+
+void spiBegin() {
+ #if !PIN_EXISTS(SS)
+ #error "SS_PIN not defined!"
+ #endif
+
+ WRITE(SS_PIN, HIGH);
+ SET_OUTPUT(SS_PIN);
+}
+
+void spiInit(uint8_t spiRate) {
+ uint32_t clock;
+
+ switch (spiRate) {
+ case SPI_FULL_SPEED: clock = SPI_CLOCK_DIV2 ; break;
+ case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4 ; break;
+ case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
+ case SPI_EIGHTH_SPEED: clock = SPI_CLOCK_DIV16; break;
+ case SPI_SPEED_5: clock = SPI_CLOCK_DIV32; break;
+ case SPI_SPEED_6: clock = SPI_CLOCK_DIV64; break;
+ default: clock = SPI_CLOCK_DIV2; // Default from the SPI library
+ }
+
+ spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
+ SPI.begin();
+}
+
+uint8_t spiRec(void) {
+ SPI.beginTransaction(spiConfig);
+ uint8_t returnByte = SPI.transfer(0xFF);
+ SPI.endTransaction();
+ return returnByte;
+}
+
+void spiRead(uint8_t* buf, uint16_t nbyte) {
+ SPI.beginTransaction(spiConfig);
+ SPI.transferBytes(0, buf, nbyte);
+ SPI.endTransaction();
+}
+
+void spiSend(uint8_t b) {
+ SPI.beginTransaction(spiConfig);
+ SPI.transfer(b);
+ SPI.endTransaction();
+}
+
+void spiSendBlock(uint8_t token, const uint8_t* buf) {
+ SPI.beginTransaction(spiConfig);
+ SPI.transfer(token);
+ SPI.writeBytes(const_cast(buf), 512);
+ SPI.endTransaction();
+}
+
+void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
+ spiConfig = SPISettings(spiClock, bitOrder, dataMode);
+
+ SPI.beginTransaction(spiConfig);
+}
+
+#endif // ARDUINO_ARCH_ESP32
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
new file mode 100644
index 000000000000..f3d444af0c58
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
@@ -0,0 +1,202 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifdef ARDUINO_ARCH_ESP32
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include
+#include "esp_types.h"
+#include "soc/timer_group_struct.h"
+#include "driver/periph_ctrl.h"
+#include "driver/timer.h"
+
+#include "HAL.h"
+
+#include "HAL_timers_ESP32.h"
+
+// --------------------------------------------------------------------------
+// Externals
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Local defines
+// --------------------------------------------------------------------------
+
+#define NUM_HARDWARE_TIMERS 4
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private Variables
+// --------------------------------------------------------------------------
+
+static timg_dev_t *TG[2] = {&TIMERG0, &TIMERG1};
+
+const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
+ { TIMER_GROUP_0, TIMER_0, STEPPER_TIMER_PRESCALE, stepTC_Handler }, // 0 - Stepper
+ { TIMER_GROUP_0, TIMER_1, TEMP_TIMER_PRESCALE, tempTC_Handler }, // 1 - Temperature
+ { TIMER_GROUP_1, TIMER_0, 1, NULL }, // 2
+ { TIMER_GROUP_1, TIMER_1, 1, NULL }, // 3
+};
+
+// --------------------------------------------------------------------------
+// Function prototypes
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private functions
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+void IRAM_ATTR timer_group0_isr(void *para) {
+ const int timer_idx = (int)para;
+
+ // Retrieve the interrupt status and the counter value
+ // from the timer that reported the interrupt
+ uint32_t intr_status = TIMERG0.int_st_timers.val;
+ TIMERG0.hw_timer[timer_idx].update = 1;
+
+ // Clear the interrupt
+ if (intr_status & BIT(timer_idx)) {
+ switch (timer_idx) {
+ case TIMER_0: TIMERG0.int_clr_timers.t0 = 1; break;
+ case TIMER_1: TIMERG0.int_clr_timers.t1 = 1; break;
+ }
+ }
+
+ const tTimerConfig timer = TimerConfig[timer_idx];
+ timer.fn();
+
+ // After the alarm has been triggered
+ // Enable it again so it gets triggered the next time
+ TIMERG0.hw_timer[timer_idx].config.alarm_en = TIMER_ALARM_EN;
+}
+
+/**
+ * Enable and initialize the timer
+ * @param timer_num timer number to initialize
+ * @param frequency frequency of the timer
+ */
+void HAL_timer_start(const uint8_t timer_num, uint32_t frequency) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+
+ timer_config_t config;
+ config.divider = STEPPER_TIMER_PRESCALE;
+ config.counter_dir = TIMER_COUNT_UP;
+ config.counter_en = TIMER_PAUSE;
+ config.alarm_en = TIMER_ALARM_EN;
+ config.intr_type = TIMER_INTR_LEVEL;
+ config.auto_reload = true;
+
+ // Select and initialize the timer
+ timer_init(timer.group, timer.idx, &config);
+
+ // Timer counter initial value and auto reload on alarm
+ timer_set_counter_value(timer.group, timer.idx, 0x00000000ULL);
+
+ // Configure the alam value and the interrupt on alarm
+ timer_set_alarm_value(timer.group, timer.idx, (HAL_TIMER_RATE) / timer.divider / frequency - 1);
+
+ timer_enable_intr(timer.group, timer.idx);
+
+ // TODO need to deal with timer_group1_isr
+ timer_isr_register(timer.group, timer.idx, timer_group0_isr, (void*)timer.idx, NULL, NULL);
+
+ timer_start(timer.group, timer.idx);
+}
+
+/**
+ * Set the upper value of the timer, when the timer reaches this upper value the
+ * interrupt should be triggered and the counter reset
+ * @param timer_num timer number to set the count to
+ * @param count threshold at which the interrupt is triggered
+ */
+void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t count) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+ timer_set_alarm_value(timer.group, timer.idx, count);
+}
+
+/**
+ * Get the current upper value of the timer
+ * @param timer_num timer number to get the count from
+ * @return the timer current threshold for the alarm to be triggered
+ */
+hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+
+ uint64_t alarm_value;
+ timer_get_alarm_value(timer.group, timer.idx, &alarm_value);
+
+ return alarm_value;
+}
+
+/**
+ * Get the current counter value between 0 and the maximum count (HAL_timer_set_count)
+ * @param timer_num timer number to get the current count
+ * @return the current counter of the alarm
+ */
+hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+
+ uint64_t counter_value;
+ timer_get_counter_value(timer.group, timer.idx, &counter_value);
+
+ return counter_value;
+}
+
+/**
+ * Enable timer interrupt on the timer
+ * @param timer_num timer number to enable interrupts on
+ */
+void HAL_timer_enable_interrupt(const uint8_t timer_num) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+ //timer_enable_intr(timer.group, timer.idx);
+}
+
+/**
+ * Disable timer interrupt on the timer
+ * @param timer_num timer number to disable interrupts on
+ */
+void HAL_timer_disable_interrupt(const uint8_t timer_num) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+ // timer_disable_intr(timer.group, timer.idx);
+}
+
+bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
+ const tTimerConfig timer = TimerConfig[timer_num];
+ return TG[timer.group]->int_ena.val | BIT(timer_num);
+}
+
+#endif // ARDUINO_ARCH_ESP32
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
new file mode 100644
index 000000000000..2ddaf2dcf05c
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
@@ -0,0 +1,114 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef _HAL_TIMERS_ESP32_H
+#define _HAL_TIMERS_ESP32_H
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include
+#include "driver/timer.h"
+
+// --------------------------------------------------------------------------
+// Defines
+// --------------------------------------------------------------------------
+//
+#define FORCE_INLINE __attribute__((always_inline)) inline
+
+typedef uint64_t hal_timer_t;
+#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFFULL
+
+#define STEP_TIMER_NUM 0 // index of timer to use for stepper
+#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
+#define PULSE_TIMER_NUM STEP_TIMER_NUM
+
+#define HAL_TIMER_RATE APB_CLK_FREQ // frequency of timer peripherals
+
+#define STEPPER_TIMER_PRESCALE 40
+#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer, 2MHz
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+
+#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+
+#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz
+#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
+
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
+
+#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
+#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
+#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
+
+#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
+#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
+
+#define HAL_TEMP_TIMER_ISR extern "C" void tempTC_Handler(void)
+#define HAL_STEP_TIMER_ISR extern "C" void stepTC_Handler(void)
+
+extern "C" void tempTC_Handler(void);
+extern "C" void stepTC_Handler(void);
+
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+typedef struct {
+ timer_group_t group;
+ timer_idx_t idx;
+ uint32_t divider;
+ void (*fn)(void);
+} tTimerConfig;
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+extern const tTimerConfig TimerConfig[];
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+void HAL_timer_start (const uint8_t timer_num, uint32_t frequency);
+void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t count);
+hal_timer_t HAL_timer_get_compare(const uint8_t timer_num);
+hal_timer_t HAL_timer_get_count(const uint8_t timer_num);
+
+// if counter too high then bump up compare
+FORCE_INLINE static void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_ticks) {
+ const hal_timer_t mincmp = HAL_timer_get_count(timer_num) + interval_ticks;
+ if (HAL_timer_get_compare(timer_num) < mincmp) HAL_timer_set_compare(timer_num, mincmp);
+}
+
+void HAL_timer_enable_interrupt(const uint8_t timer_num);
+void HAL_timer_disable_interrupt(const uint8_t timer_num);
+bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
+
+#define HAL_timer_isr_prologue(TIMER_NUM)
+#define HAL_timer_isr_epilogue(TIMER_NUM)
+
+#endif // _HAL_TIMERS_ESP32_H
diff --git a/Marlin/src/HAL/HAL_ESP32/SanityCheck.h b/Marlin/src/HAL/HAL_ESP32/SanityCheck.h
new file mode 100644
index 000000000000..a96f665151e7
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/SanityCheck.h
@@ -0,0 +1,25 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#if ENABLED(EMERGENCY_PARSER)
+ #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
+#endif
diff --git a/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h b/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h
new file mode 100644
index 000000000000..b064f16bf53e
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h
@@ -0,0 +1,75 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Endstop Interrupts
+ *
+ * Without endstop interrupts the endstop pins must be polled continually in
+ * the stepper-ISR via endstops.update(), most of the time finding no change.
+ * With this feature endstops.update() is called only when we know that at
+ * least one endstop has changed state, saving valuable CPU cycles.
+ *
+ * This feature only works when all used endstop pins can generate an 'external interrupt'.
+ *
+ * Test whether pins issue interrupts on your board by flashing 'pin_interrupt_test.ino'.
+ * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
+ */
+
+#ifndef _ENDSTOP_INTERRUPTS_H_
+#define _ENDSTOP_INTERRUPTS_H_
+
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void ICACHE_RAM_ATTR endstop_ISR(void) { endstops.update(); }
+
+void setup_endstop_interrupts(void) {
+ #if HAS_X_MAX
+ attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_X_MIN
+ attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Y_MAX
+ attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Y_MIN
+ attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z_MAX
+ attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z_MIN
+ attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z2_MAX
+ attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z2_MIN
+ attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z_MIN_PROBE_PIN
+ attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
+ #endif
+}
+
+#endif //_ENDSTOP_INTERRUPTS_H_
diff --git a/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h b/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h
new file mode 100644
index 000000000000..5f609c4f0c6d
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h
@@ -0,0 +1,72 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef _FASTIO_ESP32_H
+#define _FASTIO_ESP32_H
+
+/**
+ * Utility functions
+ */
+
+// set pin as input
+#define _SET_INPUT(IO) pinMode(IO, INPUT)
+
+// set pin as output
+#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
+
+// set pin as input with pullup mode
+#define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT)
+
+// Read a pin wrapper
+#define READ(IO) digitalRead(IO)
+
+// Write to a pin wrapper
+#define WRITE(IO, v) digitalWrite(IO, v)
+
+// set pin as input wrapper
+#define SET_INPUT(IO) _SET_INPUT(IO)
+
+// set pin as input with pullup wrapper
+#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
+
+// set pin as output wrapper
+#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); WRITE(IO, LOW); }while(0)
+
+#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
+
+//
+// ports and functions
+//
+
+// UART
+#define RXD 3
+#define TXD 1
+
+// TWI (I2C)
+#define SCL 5
+#define SDA 4
+
+//
+// pins
+//
+
+#endif // _FASTIO_ESP32_H
diff --git a/Marlin/src/HAL/HAL_ESP32/ota.cpp b/Marlin/src/HAL/HAL_ESP32/ota.cpp
new file mode 100644
index 000000000000..b7fd1bb5c472
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/ota.cpp
@@ -0,0 +1,81 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifdef ARDUINO_ARCH_ESP32
+
+#include "../../inc/MarlinConfigPre.h"
+
+#if ENABLED(WIFISUPPORT)
+
+#include
+#include
+#include
+#include
+#include "driver/timer.h"
+
+void OTA_init() {
+ WiFi.mode(WIFI_STA);
+ WiFi.begin(WIFI_SSID, WIFI_PWD);
+
+ while (WiFi.waitForConnectResult() != WL_CONNECTED) {
+ Serial.println("Connection Failed! Rebooting...");
+ delay(5000);
+ ESP.restart();
+ }
+
+ ArduinoOTA
+ .onStart([]() {
+ timer_pause(TIMER_GROUP_0, TIMER_0);
+ timer_pause(TIMER_GROUP_0, TIMER_1);
+
+ // U_FLASH or U_SPIFFS
+ String type = (ArduinoOTA.getCommand() == U_FLASH) ? "sketch" : "filesystem";
+
+ // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
+ Serial.println("Start updating " + type);
+ })
+ .onEnd([]() {
+ Serial.println("\nEnd");
+ })
+ .onProgress([](unsigned int progress, unsigned int total) {
+ Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
+ })
+ .onError([](ota_error_t error) {
+ Serial.printf("Error[%u]: ", error);
+ char *str;
+ switch (error) {
+ case OTA_AUTH_ERROR: str = "Auth Failed"; break;
+ case OTA_BEGIN_ERROR: str = "Begin Failed"; break;
+ case OTA_CONNECT_ERROR: str = "Connect Failed"; break;
+ case OTA_RECEIVE_ERROR: str = "Receive Failed"; break;
+ case OTA_END_ERROR: str = "End Failed"; break;
+ }
+ Serial.println(str);
+ });
+
+ ArduinoOTA.begin();
+}
+
+void OTA_handle() {
+ ArduinoOTA.handle();
+}
+
+#endif // WIFISUPPORT
+
+#endif // ARDUINO_ARCH_ESP32
diff --git a/Marlin/src/HAL/HAL_ESP32/ota.h b/Marlin/src/HAL/HAL_ESP32/ota.h
new file mode 100644
index 000000000000..4af2a74cabed
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/ota.h
@@ -0,0 +1,26 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef _HAL_OTA_H
+#define _HAL_OTA_H
+
+void OTA_init();
+void OTA_handle();
+
+#endif
diff --git a/Marlin/src/HAL/HAL_ESP32/servotimers.h b/Marlin/src/HAL/HAL_ESP32/servotimers.h
new file mode 100644
index 000000000000..98b0b3c54eb7
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/servotimers.h
@@ -0,0 +1,21 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
diff --git a/Marlin/src/HAL/HAL_ESP32/spi_pins.h b/Marlin/src/HAL/HAL_ESP32/spi_pins.h
new file mode 100644
index 000000000000..ecd58b9100d6
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/spi_pins.h
@@ -0,0 +1,28 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef SPI_PINS_H_
+#define SPI_PINS_H_
+
+#define SS_PIN 5
+#define SCK_PIN 18
+#define MISO_PIN 19
+#define MOSI_PIN 23
+
+#endif // SPI_PINS_H_
diff --git a/Marlin/src/HAL/HAL_spi_pins.h b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp
similarity index 63%
rename from Marlin/src/HAL/HAL_spi_pins.h
rename to Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp
index 495d039872f7..07e00e95b472 100644
--- a/Marlin/src/HAL/HAL_spi_pins.h
+++ b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp
@@ -20,29 +20,22 @@
*
*/
-#ifndef HAL_SPI_PINS_H_
-#define HAL_SPI_PINS_H_
+#ifdef ARDUINO_ARCH_ESP32
-#ifdef ARDUINO_ARCH_SAM
- #include "HAL_DUE/spi_pins.h"
+#include "../../inc/MarlinConfig.h"
-#elif defined(IS_32BIT_TEENSY)
- #include "HAL_TEENSY35_36/spi_pins.h"
+#if ENABLED(USE_WATCHDOG)
-#elif defined(__AVR__)
- #include "HAL_AVR/spi_pins.h"
+#include "watchdog_ESP32.h"
-#elif defined(TARGET_LPC1768)
- #include "HAL_LPC1768/spi_pins.h"
+void watchdogSetup(void) {
+ // do whatever. don't remove this function.
+}
-#elif defined(__STM32F1__)
- #include "HAL_STM32F1/spi_pins.h"
+void watchdog_init(void) {
+ // TODO
+}
-#elif defined(STM32F7)
- #include "HAL_STM32F7/spi_pins.h"
+#endif // USE_WATCHDOG
-#else
- #error "Unsupported Platform!"
-#endif
-
-#endif // HAL_SPI_PINS_H_
+#endif // ARDUINO_ARCH_ESP32
diff --git a/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h
new file mode 100644
index 000000000000..39f028727564
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h
@@ -0,0 +1,32 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef WATCHDOG_ESP32_H
+#define WATCHDOG_ESP32_H
+
+// Initialize watchdog with a 4 second interrupt time
+void watchdog_init();
+
+// Reset watchdog.
+inline void watchdog_reset() {};
+
+#endif // WATCHDOG_ESP32_H
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp
index 64b90ab1d5d7..b579aa620a35 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp
@@ -21,12 +21,13 @@
#ifdef TARGET_LPC1768
#include "../../inc/MarlinConfig.h"
+#include "../Delay.h"
HalSerial usb_serial;
// U8glib required functions
extern "C" void u8g_xMicroDelay(uint16_t val) {
- delayMicroseconds(val);
+ DELAY_US(val);
}
extern "C" void u8g_MicroDelay(void) {
u8g_xMicroDelay(1);
@@ -247,7 +248,7 @@ uint16_t HAL_adc_get_result(void) {
data = lowpass_filter[adc_channel].update(data);
#endif
- return ((data >> 2) & 0x3ff); // return 10bit value as Marlin expects
+ return ((data >> 2) & 0x3FF); // return 10bit value as Marlin expects
}
#define SBIT_CNTEN 0
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h
index 40f3a8e905b8..b26581d44356 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL.h
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h
@@ -28,6 +28,8 @@
#ifndef _HAL_LPC1768_H_
#define _HAL_LPC1768_H_
+#define CPU_32_BIT
+
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
@@ -58,15 +60,23 @@ extern "C" volatile uint32_t _millis;
#include
#include
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "serial.h"
#include "HAL_timers.h"
#include "HardwareSerial.h"
-#define ST7920_DELAY_1 DELAY_20_NOP;DELAY_20_NOP;DELAY_20_NOP
-#define ST7920_DELAY_2 DELAY_20_NOP;DELAY_20_NOP;DELAY_20_NOP;DELAY_10_NOP;DELAY_5_NOP
-#define ST7920_DELAY_3 DELAY_20_NOP;DELAY_20_NOP;DELAY_20_NOP;DELAY_10_NOP;DELAY_5_NOP
+#ifndef ST7920_DELAY_1
+ #define ST7920_DELAY_1 DELAY_NS(600)
+#endif
+#ifndef ST7920_DELAY_2
+ #define ST7920_DELAY_2 DELAY_NS(750)
+#endif
+#ifndef ST7920_DELAY_3
+ #define ST7920_DELAY_3 DELAY_NS(750)
+#endif
extern HalSerial usb_serial;
@@ -116,8 +126,11 @@ extern HalSerial usb_serial;
#define NUM_SERIAL 1
#endif
-#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq();
-#define CRITICAL_SECTION_END if (!primask) __enable_irq();
+#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
+#define CRITICAL_SECTION_END if (!primask) __enable_irq()
+#define ISRS_ENABLED() (!__get_PRIMASK())
+#define ENABLE_ISRS() __enable_irq()
+#define DISABLE_ISRS() __disable_irq()
//Utility functions
int freeMemory(void);
@@ -133,11 +146,13 @@ uint8_t spiRec(uint32_t chan);
// ADC
#define HAL_ANALOG_SELECT(pin) HAL_adc_enable_channel(pin)
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
-#define HAL_READ_ADC HAL_adc_get_result()
+#define HAL_READ_ADC() HAL_adc_get_result()
+#define HAL_ADC_READY() HAL_adc_finished()
void HAL_adc_init(void);
void HAL_adc_enable_channel(int pin);
void HAL_adc_start_conversion(const uint8_t adc_pin);
uint16_t HAL_adc_get_result(void);
+bool HAL_adc_finished(void);
#endif // _HAL_LPC1768_H_
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
index 607c027e3932..c8fe029d39bc 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
@@ -83,14 +83,14 @@
}
uint8_t spiRec() {
- uint8_t b = spiTransfer(0xff);
+ uint8_t b = spiTransfer(0xFF);
return b;
}
void spiRead(uint8_t*buf, uint16_t nbyte) {
if (nbyte == 0) return;
for (int i = 0; i < nbyte; i++) {
- buf[i] = spiTransfer(0xff);
+ buf[i] = spiTransfer(0xFF);
}
}
@@ -150,7 +150,7 @@
}
void spiInit(uint8_t spiRate) {
-
+ SSP_Cmd(LPC_SSP0, DISABLE); // Disable SSP0 before changing rate
// table to convert Marlin spiRates (0-5 plus default) into bit rates
uint32_t Marlin_speed[7]; // CPSR is always 2
Marlin_speed[0] = 8333333; //(SCR: 2) desired: 8,000,000 actual: 8,333,333 +4.2% SPI_FULL_SPEED
@@ -242,6 +242,21 @@
void SPIClass::begin() { spiBegin(); }
+void SPIClass::beginTransaction(SPISettings cfg) {
+ uint8_t spiRate;
+ switch(cfg.spiRate()) {
+ case 8000000: spiRate=0 ;break;
+ case 4000000: spiRate=1 ;break;
+ case 2000000: spiRate=2 ;break;
+ case 1000000: spiRate=3 ;break;
+ case 500000: spiRate=4 ;break;
+ case 250000: spiRate=5 ;break;
+ case 125000: spiRate=6 ;break;
+ default: spiRate=2; break;
+ }
+ spiInit(spiRate);
+}
+
uint8_t SPIClass::transfer(uint8_t B) {
return spiTransfer(B);
}
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp
index 3f7507aa5ba6..3714fe1a3998 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp
@@ -23,7 +23,7 @@
/**
* Description:
*
- * For TARGET_LPC1768
+ * Timers for LPC1768
*/
#ifdef TARGET_LPC1768
@@ -32,63 +32,35 @@
#include "HAL_timers.h"
void HAL_timer_init(void) {
- SBI(LPC_SC->PCONP, 1); // power on timer0
- LPC_TIM0->PR = (HAL_TIMER_RATE) / (HAL_STEPPER_TIMER_RATE) - 1; // Use prescaler to set frequency if needed
+ SBI(LPC_SC->PCONP, SBIT_TIMER0); // Power ON Timer 0
+ LPC_TIM0->PR = (HAL_TIMER_RATE) / (STEPPER_TIMER_RATE) - 1; // Use prescaler to set frequency if needed
- SBI(LPC_SC->PCONP, 2); // power on timer1
+ SBI(LPC_SC->PCONP, SBIT_TIMER1); // Power ON Timer 1
LPC_TIM1->PR = (HAL_TIMER_RATE) / 1000000 - 1;
}
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
switch (timer_num) {
case 0:
- LPC_TIM0->MCR = 3; // Match on MR0, reset on MR0
- LPC_TIM0->MR0 = uint32_t(HAL_STEPPER_TIMER_RATE) / frequency; // Match value (period) to set frequency
- LPC_TIM0->TCR = _BV(0); // enable
- break;
- case 1:
- LPC_TIM1->MCR = 3;
- LPC_TIM1->MR0 = uint32_t(HAL_TEMP_TIMER_RATE) / frequency;
- LPC_TIM1->TCR = _BV(0);
- break;
- default: break;
- }
-}
+ LPC_TIM0->MCR = _BV(SBIT_MR0I) | _BV(SBIT_MR0R); // Match on MR0, reset on MR0, interrupts when NVIC enables them
+ LPC_TIM0->MR0 = uint32_t(STEPPER_TIMER_RATE) / frequency; // Match value (period) to set frequency
+ LPC_TIM0->TCR = _BV(SBIT_CNTEN); // Counter Enable
-void HAL_timer_enable_interrupt(const uint8_t timer_num) {
- switch (timer_num) {
- case 0:
- NVIC_EnableIRQ(TIMER0_IRQn); // Enable interrupt handler
NVIC_SetPriority(TIMER0_IRQn, NVIC_EncodePriority(0, 1, 0));
+ NVIC_EnableIRQ(TIMER0_IRQn);
break;
+
case 1:
- NVIC_EnableIRQ(TIMER1_IRQn);
+ LPC_TIM1->MCR = _BV(SBIT_MR0I) | _BV(SBIT_MR0R); // Match on MR0, reset on MR0, interrupts when NVIC enables them
+ LPC_TIM1->MR0 = uint32_t(TEMP_TIMER_RATE) / frequency;
+ LPC_TIM1->TCR = _BV(SBIT_CNTEN); // Counter Enable
+
NVIC_SetPriority(TIMER1_IRQn, NVIC_EncodePriority(0, 2, 0));
+ NVIC_EnableIRQ(TIMER1_IRQn);
break;
- }
-}
-
-void HAL_timer_disable_interrupt(const uint8_t timer_num) {
- switch (timer_num) {
- case 0: NVIC_DisableIRQ(TIMER0_IRQn); break; // disable interrupt handler
- case 1: NVIC_DisableIRQ(TIMER1_IRQn); break;
- }
-}
-
-bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
- switch (timer_num) {
- case 0: return NVIC_GetActive(TIMER0_IRQn);
- case 1: return NVIC_GetActive(TIMER1_IRQn);
- }
- return false;
-}
-void HAL_timer_isr_prologue(const uint8_t timer_num) {
- switch (timer_num) {
- case 0: SBI(LPC_TIM0->IR, 0); break; // Clear the Interrupt
- case 1: SBI(LPC_TIM1->IR, 0); break;
+ default: break;
}
}
-
#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
index cfbf593f517b..2113335385b9 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
@@ -34,29 +34,55 @@
#include
+#include "../../core/macros.h"
+
+#define SBIT_TIMER0 1
+#define SBIT_TIMER1 2
+
+#define SBIT_CNTEN 0
+
+#define SBIT_MR0I 0 // Timer 0 Interrupt when TC matches MR0
+#define SBIT_MR0R 1 // Timer 0 Reset TC on Match
+#define SBIT_MR0S 2 // Timer 0 Stop TC and PC on Match
+#define SBIT_MR1I 3
+#define SBIT_MR1R 4
+#define SBIT_MR1S 5
+#define SBIT_MR2I 6
+#define SBIT_MR2R 7
+#define SBIT_MR2S 8
+#define SBIT_MR3I 9
+#define SBIT_MR3R 10
+#define SBIT_MR3S 11
+
// --------------------------------------------------------------------------
// Defines
// --------------------------------------------------------------------------
-#define FORCE_INLINE __attribute__((always_inline)) inline
+#define _HAL_TIMER(T) _CAT(LPC_TIM, T)
+#define _HAL_TIMER_IRQ(T) TIMER##T##_IRQn
+#define __HAL_TIMER_ISR(T) extern "C" void TIMER##T##_IRQHandler(void)
+#define _HAL_TIMER_ISR(T) __HAL_TIMER_ISR(T)
typedef uint32_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
-#define STEP_TIMER_NUM 0 // index of timer to use for stepper
-#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
-
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
-#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / HAL_TICKS_PER_US)
-#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
-#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
-#define HAL_TEMP_TIMER_RATE 1000000
+
+#define STEP_TIMER_NUM 0 // Timer Index for Stepper
+#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
+#define PULSE_TIMER_NUM STEP_TIMER_NUM
+#define PWM_TIMER_NUM 3 // Timer Index for PWM
+
+#define TEMP_TIMER_RATE 1000000
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
-#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
-#define PULSE_TIMER_NUM STEP_TIMER_NUM
-#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
@@ -65,23 +91,12 @@ typedef uint32_t hal_timer_t;
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
-#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr) DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
-
-#define HAL_STEP_TIMER_ISR extern "C" void TIMER0_IRQHandler(void)
-#define HAL_TEMP_TIMER_ISR extern "C" void TIMER1_IRQHandler(void)
-
-// PWM timer
-#define HAL_PWM_TIMER LPC_TIM3
-#define HAL_PWM_TIMER_ISR extern "C" void TIMER3_IRQHandler(void)
-#define HAL_PWM_TIMER_IRQn TIMER3_IRQn
+#define HAL_STEP_TIMER_ISR _HAL_TIMER_ISR(STEP_TIMER_NUM)
+#define HAL_TEMP_TIMER_ISR _HAL_TIMER_ISR(TEMP_TIMER_NUM)
-// --------------------------------------------------------------------------
-// Types
-// --------------------------------------------------------------------------
-
-// --------------------------------------------------------------------------
-// Public Variables
-// --------------------------------------------------------------------------
+// Timer references by index
+#define STEP_TIMER _HAL_TIMER(STEP_TIMER_NUM)
+#define TEMP_TIMER _HAL_TIMER(TEMP_TIMER_NUM)
// --------------------------------------------------------------------------
// Public functions
@@ -91,31 +106,23 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
switch (timer_num) {
- case 0:
- LPC_TIM0->MR0 = compare;
- if (LPC_TIM0->TC > compare)
- LPC_TIM0->TC = compare - 5; // generate an immediate stepper ISR
- break;
- case 1:
- LPC_TIM1->MR0 = compare;
- if (LPC_TIM1->TC > compare)
- LPC_TIM1->TC = compare - 5; // make sure we don't have one extra long period
- break;
+ case 0: STEP_TIMER->MR0 = compare; break; // Stepper Timer Match Register 0
+ case 1: TEMP_TIMER->MR0 = compare; break; // Temp Timer Match Register 0
}
}
FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
switch (timer_num) {
- case 0: return LPC_TIM0->MR0;
- case 1: return LPC_TIM1->MR0;
+ case 0: return STEP_TIMER->MR0; // Stepper Timer Match Register 0
+ case 1: return TEMP_TIMER->MR0; // Temp Timer Match Register 0
}
return 0;
}
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
switch (timer_num) {
- case 0: return LPC_TIM0->TC;
- case 1: return LPC_TIM1->TC;
+ case 0: return STEP_TIMER->TC; // Stepper Timer Count
+ case 1: return TEMP_TIMER->TC; // Temp Timer Count
}
return 0;
}
@@ -125,9 +132,45 @@ FORCE_INLINE static void HAL_timer_restrain(const uint8_t timer_num, const uint1
if (HAL_timer_get_compare(timer_num) < mincmp) HAL_timer_set_compare(timer_num, mincmp);
}
-void HAL_timer_enable_interrupt(const uint8_t timer_num);
-void HAL_timer_disable_interrupt(const uint8_t timer_num);
-bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
-void HAL_timer_isr_prologue(const uint8_t timer_num);
+FORCE_INLINE static void HAL_timer_enable_interrupt(const uint8_t timer_num) {
+ switch (timer_num) {
+ case 0: NVIC_EnableIRQ(TIMER0_IRQn); // Enable interrupt handler
+ case 1: NVIC_EnableIRQ(TIMER1_IRQn); // Enable interrupt handler
+ }
+}
+
+FORCE_INLINE static void HAL_timer_disable_interrupt(const uint8_t timer_num) {
+ switch (timer_num) {
+ case 0: NVIC_DisableIRQ(TIMER0_IRQn); // Disable interrupt handler
+ case 1: NVIC_DisableIRQ(TIMER1_IRQn); // Disable interrupt handler
+ }
+
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+}
+
+// This function is missing from CMSIS
+FORCE_INLINE static bool NVIC_GetEnableIRQ(IRQn_Type IRQn) {
+ return (NVIC->ISER[((uint32_t)IRQn) >> 5] & (1 << ((uint32_t)IRQn) & 0x1F)) != 0;
+}
+
+FORCE_INLINE static bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
+ switch (timer_num) {
+ case 0: return NVIC_GetEnableIRQ(TIMER0_IRQn); // Check if interrupt is enabled or not
+ case 1: return NVIC_GetEnableIRQ(TIMER1_IRQn); // Check if interrupt is enabled or not
+ }
+ return false;
+}
+
+FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
+ switch (timer_num) {
+ case 0: SBI(STEP_TIMER->IR, SBIT_CNTEN); break;
+ case 1: SBI(TEMP_TIMER->IR, SBIT_CNTEN); break;
+ }
+}
+
+#define HAL_timer_isr_epilogue(TIMER_NUM)
-#endif // _HAL_TIMERS_DUE_H
+#endif // _HAL_TIMERS_H
diff --git a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h b/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h
deleted file mode 100644
index 7796257240e7..000000000000
--- a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- *
- * Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- */
-
-#ifndef HARDWARE_SERIAL_H_
-#define HARDWARE_SERIAL_H_
-
-#include
-#include
-#include
-
-extern "C" {
- #include
- #include "lpc17xx_pinsel.h"
-}
-
-class HardwareSerial : public Stream {
-private:
- LPC_UART_TypeDef *UARTx;
-
- uint32_t Baudrate;
- uint32_t Status;
- uint8_t RxBuffer[RX_BUFFER_SIZE];
- uint32_t RxQueueWritePos;
- uint32_t RxQueueReadPos;
- #if TX_BUFFER_SIZE > 0
- uint8_t TxBuffer[TX_BUFFER_SIZE];
- uint32_t TxQueueWritePos;
- uint32_t TxQueueReadPos;
- #endif
-
-public:
- HardwareSerial(LPC_UART_TypeDef *UARTx)
- : UARTx(UARTx)
- , Baudrate(0)
- , RxQueueWritePos(0)
- , RxQueueReadPos(0)
- #if TX_BUFFER_SIZE > 0
- , TxQueueWritePos(0)
- , TxQueueReadPos(0)
- #endif
- {
- }
-
- void begin(uint32_t baudrate);
- int peek();
- int read();
- size_t write(uint8_t send);
- #if TX_BUFFER_SIZE > 0
- void flushTX();
- #endif
- int available();
- void flush();
- void printf(const char *format, ...);
-
- operator bool() { return true; }
-
- void IRQHandler();
-
- #define DEC 10
- #define HEX 16
- #define OCT 8
- #define BIN 2
-
- void print_bin(uint32_t value, uint8_t num_digits) {
- uint32_t mask = 1 << (num_digits -1);
- for (uint8_t i = 0; i < num_digits; i++) {
- if (!(i % 4) && i) printf(" ");
- if (!(i % 16) && i) printf(" ");
- if (value & mask) printf("1");
- else printf("0");
- value <<= 1;
- }
- }
-
- void print(const char value[]) {
- printf("%s" , value);
- }
- void print(char value, int nbase = 0) {
- if (nbase == BIN) print_bin(value,8);
- else if (nbase == OCT) printf("%3o", value);
- else if (nbase == HEX) printf("%2X", value);
- else if (nbase == DEC ) printf("%d", value);
- else printf("%c" , value);
- }
- void print(unsigned char value, int nbase = 0) {
- if (nbase == BIN) print_bin(value,8);
- else if (nbase == OCT) printf("%3o", value);
- else if (nbase == HEX) printf("%2X", value);
- else printf("%u" , value);
- }
- void print(int value, int nbase = 0) {
- if (nbase == BIN) print_bin(value,16);
- else if (nbase == OCT) printf("%6o", value);
- else if (nbase == HEX) printf("%4X", value);
- else printf("%d", value);
- }
- void print(unsigned int value, int nbase = 0) {
- if (nbase == BIN) print_bin(value,16);
- else if (nbase == OCT) printf("%6o", value);
- else if (nbase == HEX) printf("%4X", value);
- else printf("%u" , value);
- }
- void print(long value, int nbase = 0) {
- if (nbase == BIN) print_bin(value,32);
- else if (nbase == OCT) printf("%11o", value);
- else if (nbase == HEX) printf("%8X", value);
- else printf("%ld" , value);
- }
- void print(unsigned long value, int nbase = 0) {
- if (nbase == BIN) print_bin(value,32);
- else if (nbase == OCT) printf("%11o", value);
- else if (nbase == HEX) printf("%8X", value);
- else printf("%lu" , value);
- }
- void print(float value, int round = 6) {
- printf("%f" , value);
- }
- void print(double value, int round = 6) {
- printf("%f" , value );
- }
-
-
-
- void println(const char value[]) {
- printf("%s\n" , value);
- }
- void println(char value, int nbase = 0) {
- print(value, nbase);
- println();
- }
- void println(unsigned char value, int nbase = 0) {
- print(value, nbase);
- println();
- }
- void println(int value, int nbase = 0) {
- print(value, nbase);
- println();
- }
- void println(unsigned int value, int nbase = 0) {
- print(value, nbase);
- println();
- }
- void println(long value, int nbase = 0) {
- print(value, nbase);
- println();
- }
- void println(unsigned long value, int nbase = 0) {
- print(value, nbase);
- println();
- }
- void println(float value, int round = 6) {
- printf("%f\n" , value );
- }
- void println(double value, int round = 6) {
- printf("%f\n" , value );
- }
- void println(void) {
- print('\n');
- }
-
-};
-
-#endif // MARLIN_SRC_HAL_HAL_SERIAL_H_
diff --git a/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp b/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp
index 3b08bfb78e98..b27d8e1f3105 100644
--- a/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp
@@ -78,12 +78,14 @@
#define NUM_ISR_PWMS 20
+#define HAL_PWM_TIMER LPC_TIM3
+#define HAL_PWM_TIMER_ISR extern "C" void TIMER3_IRQHandler(void)
+#define HAL_PWM_TIMER_IRQn TIMER3_IRQn
#define LPC_PORT_OFFSET (0x0020)
#define LPC_PIN(pin) (1UL << pin)
#define LPC_GPIO(port) ((volatile LPC_GPIO_TypeDef *)(LPC_GPIO0_BASE + LPC_PORT_OFFSET * port))
-
typedef struct { // holds all data needed to control/init one of the PWM channels
bool active_flag; // THIS TABLE ENTRY IS ACTIVELY TOGGLING A PIN
pin_t pin;
@@ -213,7 +215,7 @@ void LPC1768_PWM_sort(void) {
}
}
-bool LPC1768_PWM_attach_pin(pin_t pin, uint32_t min /* = 1 */, uint32_t max /* = (LPC_PWM1_MR0 - 1) */, uint8_t servo_index /* = 0xff */) {
+bool LPC1768_PWM_attach_pin(pin_t pin, uint32_t min /* = 1 */, uint32_t max /* = (LPC_PWM1_MR0 - 1) */, uint8_t servo_index /* = 0xFF */) {
pin = GET_PIN_MAP_PIN(GET_PIN_MAP_INDEX(pin & 0xFF)); // Sometimes the upper byte is garbled
@@ -256,6 +258,11 @@ bool LPC1768_PWM_attach_pin(pin_t pin, uint32_t min /* = 1 */, uint32_t max /* =
// OK to update the active table because the
// ISR doesn't use any of the changed items
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
if (ISR_table_update) //use work table if that's the newest
temp_table = work_table;
else
@@ -340,6 +347,11 @@ bool LPC1768_PWM_detach_pin(pin_t pin) {
//// interrupt controlled PWM code
NVIC_DisableIRQ(HAL_PWM_TIMER_IRQn);
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
if (ISR_table_update) {
ISR_table_update = false; // don't update yet - have another update to do
NVIC_EnableIRQ(HAL_PWM_TIMER_IRQn); // re-enable PWM interrupts
@@ -426,6 +438,12 @@ bool LPC1768_PWM_write(pin_t pin, uint32_t value) {
//// interrupt controlled PWM code
NVIC_DisableIRQ(HAL_PWM_TIMER_IRQn);
+
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
if (!ISR_table_update) // use the most up to date table
COPY_ACTIVE_TABLE; // copy active table into work table
@@ -454,6 +472,11 @@ bool useable_hardware_PWM(pin_t pin) {
NVIC_DisableIRQ(HAL_PWM_TIMER_IRQn);
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+
bool return_flag = false;
for (uint8_t i = 0; i < NUM_ISR_PWMS; i++) // see if it's already setup
if (active_table[i].pin == pin) return_flag = true;
diff --git a/Marlin/src/HAL/HAL_LPC1768/LPC1768_Servo.cpp b/Marlin/src/HAL/HAL_LPC1768/LPC1768_Servo.cpp
index 317433191c0a..4997c5e4bca9 100644
--- a/Marlin/src/HAL/HAL_LPC1768/LPC1768_Servo.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/LPC1768_Servo.cpp
@@ -42,8 +42,8 @@
*
* write() - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.)
* writeMicroseconds() - Set the servo pulse width in microseconds.
- * move(pin, angle) - Sequence of attach(pin), write(angle), delay(SERVO_DELAY).
- * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after SERVO_DELAY.
+ * move(pin, angle) - Sequence of attach(pin), write(angle), safe_delay(servo_delay[servoIndex]).
+ * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after servo_delay[servoIndex].
* read() - Get the last-written servo pulse width as an angle between 0 and 180.
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
* attached() - Return true if a servo is attached.
@@ -60,9 +60,11 @@
* unless DEACTIVATE_SERVOS_AFTER_MOVE is enabled and a MOVE command was issued.
*/
+#ifdef TARGET_LPC1768
+
#include "../../inc/MarlinConfig.h"
-#if HAS_SERVOS && defined(TARGET_LPC1768)
+#if HAS_SERVOS
#include "LPC1768_PWM.h"
#include "LPC1768_Servo.h"
@@ -148,7 +150,7 @@
static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
if (this->attach(0) >= 0) { // notice the pin number is zero here
this->write(value);
- delay(servo_delay[this->servoIndex]);
+ safe_delay(servo_delay[this->servoIndex]);
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
this->detach();
LPC1768_PWM_detach_pin(servo_info[this->servoIndex].Pin.nbr); // shut down the PWM signal
@@ -157,4 +159,5 @@
}
}
-#endif // HAS_SERVOS && TARGET_LPC1768
+#endif // HAS_SERVOS
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
index a408a6c5877e..16299696a1f5 100644
--- a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
@@ -66,7 +66,7 @@
#endif
#endif // SPINDLE_LASER_ENABLE
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && ENABLED(HAVE_TMC2130) && DISABLED(TMC_USE_SW_SPI) \
+#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \
&& (MB(RAMPS_14_RE_ARM_EFB) \
|| MB(RAMPS_14_RE_ARM_EEB) \
|| MB(RAMPS_14_RE_ARM_EFF) \
diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.cpp b/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.cpp
index 14c01e83ba59..546a1d50f105 100644
--- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.cpp
@@ -29,10 +29,10 @@
* For TARGET_LPC1768
*/
-#include "../../inc/MarlinConfig.h"
-
#ifdef TARGET_LPC1768
+#include "../../inc/MarlinConfig.h"
+
// --------------------------------------------------------------------------
// Software SPI
// --------------------------------------------------------------------------
@@ -84,7 +84,7 @@ void swSpiBegin(const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin)
uint8_t swSpiInit(const uint8_t spiRate, const pin_t sck_pin, const pin_t mosi_pin) {
WRITE(mosi_pin, HIGH);
WRITE(sck_pin, LOW);
- return (SystemCoreClock == 120000000 ? 44 : 38) / POW(2, 6 - min(spiRate, 6));
+ return (SystemCoreClock == 120000000 ? 44 : 38) / POW(2, 6 - MIN(spiRate, 6));
}
#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp b/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp
index 3bedb71e91f0..a92a61a8fd81 100644
--- a/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp
@@ -19,29 +19,20 @@
#ifdef TARGET_LPC1768
#include "../../inc/MarlinConfig.h"
-#include
-#include
-//#include "HAL_timers.h"
-#include "fastio.h"
#define GNUM 31
typedef void (*interruptCB)(void);
-static interruptCB callbacksP0[GNUM];
-static interruptCB callbacksP2[GNUM];
+static interruptCB callbacksP0[GNUM] = {};
+static interruptCB callbacksP2[GNUM] = {};
extern "C" void GpioEnableInt(const uint32_t port, const uint32_t pin, const uint32_t mode);
extern "C" void GpioDisableInt(const uint32_t port, const uint32_t pin);
-//void deadloop(void) {}
-/* Configure PIO interrupt sources */
static void __initialize() {
- for (uint8_t i = 0; i < GNUM; i++) {
- callbacksP0[i] = 0;
- callbacksP2[i] = 0;
- }
+ NVIC_SetPriority(EINT3_IRQn, NVIC_EncodePriority(0, 1, 0));
NVIC_EnableIRQ(EINT3_IRQn);
}
@@ -54,6 +45,7 @@ void attachInterrupt(const pin_t pin, void (*callback)(void), uint32_t mode) {
__initialize();
++enabled;
}
+
uint8_t myport = LPC1768_PIN_PORT(pin),
mypin = LPC1768_PIN_PIN(pin);
@@ -130,60 +122,41 @@ extern "C" void GpioDisableInt(const uint32_t port, const uint32_t pin) {
}
}
-constexpr bool isPowerOf2(const uint16_t n) {
- return IS_POWER_OF_2(n);
-}
-
-#if 0
- extern "C" void EINT3_IRQHandler () {
- LPC_GPIOINT->IO0IntClr = LPC_GPIOINT->IO2IntClr = 0xFFFFFFFF;
- TOGGLE(13);
- //NVIC_ClearPendingIRQ(EINT3_IRQn);
+extern "C" void EINT3_IRQHandler(void) {
+ // Read in all current interrupt registers. We do this once as the
+ // GPIO interrupt registers are on the APB bus, and this is slow.
+ uint32_t rise0 = LPC_GPIOINT->IO0IntStatR,
+ fall0 = LPC_GPIOINT->IO0IntStatF,
+ rise2 = LPC_GPIOINT->IO2IntStatR,
+ fall2 = LPC_GPIOINT->IO2IntStatF;
+
+ // Clear the interrupts ASAP
+ LPC_GPIOINT->IO0IntClr = LPC_GPIOINT->IO2IntClr = 0xFFFFFFFF;
+ NVIC_ClearPendingIRQ(EINT3_IRQn);
+
+ while (rise0 > 0) { // If multiple pins changes happened continue as long as there are interrupts pending
+ const uint8_t bitloc = 31 - __CLZ(rise0); // CLZ returns number of leading zeros, 31 minus that is location of first pending interrupt
+ if (callbacksP0[bitloc] != NULL) callbacksP0[bitloc]();
+ rise0 -= _BV(bitloc);
}
-#else
-
- extern "C" void EINT3_IRQHandler(void) {
- // Read in all current interrupt registers. We do this once as the
- // GPIO interrupt registers are on the APB bus, and this is slow.
- uint32_t rise0 = LPC_GPIOINT->IO0IntStatR,
- fall0 = LPC_GPIOINT->IO0IntStatF,
- rise2 = LPC_GPIOINT->IO2IntStatR,
- fall2 = LPC_GPIOINT->IO2IntStatF;
- // Clear the interrupts ASAP
- LPC_GPIOINT->IO0IntClr = LPC_GPIOINT->IO2IntClr = 0xFFFFFFFF;
- NVIC_ClearPendingIRQ(EINT3_IRQn);
-
- /* multiple pins changes happened.*/
- if (rise0) while (rise0 > 0) { // Continue as long as there are interrupts pending
- const uint8_t bitloc = 31 - __CLZ(rise0); //CLZ returns number of leading zeros, 31 minus that is location of first pending interrupt
- if (callbacksP0[bitloc] != NULL) callbacksP0[bitloc]();
- rise0 -= _BV(bitloc);
- }
-
- if (fall0) while (fall0 > 0) {
- const uint8_t bitloc = 31 - __CLZ(fall0);
- if (callbacksP0[bitloc] != NULL) callbacksP0[bitloc]();
- fall0 -= _BV(bitloc);
- }
- if (rise2) while(rise2 > 0) {
- const uint8_t bitloc = 31 - __CLZ(rise2);
- if (callbacksP2[bitloc] != NULL) callbacksP2[bitloc]();
- //LPC_GPIOINT->IO2IntClr = 1 << bitloc;
- rise2 -= _BV(bitloc);
- }
+ while (fall0 > 0) {
+ const uint8_t bitloc = 31 - __CLZ(fall0);
+ if (callbacksP0[bitloc] != NULL) callbacksP0[bitloc]();
+ fall0 -= _BV(bitloc);
+ }
- if (fall2) while (fall2 > 0) {
- const uint8_t bitloc = 31 - __CLZ(fall2);
- if (callbacksP2[bitloc] != NULL) callbacksP2[bitloc]();
- //LPC_GPIOINT->IO2IntClr = 1 << bitloc;
- fall2 -= _BV(bitloc);
- }
- //NVIC_ClearPendingIRQ(EINT3_IRQn);
- //LPC_GPIOINT->IO0IntClr = LPC_GPIOINT->IO2IntClr = 0xFFFFFFFF;
- //NVIC_ClearPendingIRQ(EINT3_IRQn);
+ while(rise2 > 0) {
+ const uint8_t bitloc = 31 - __CLZ(rise2);
+ if (callbacksP2[bitloc] != NULL) callbacksP2[bitloc]();
+ rise2 -= _BV(bitloc);
}
-#endif
+ while (fall2 > 0) {
+ const uint8_t bitloc = 31 - __CLZ(fall2);
+ if (callbacksP2[bitloc] != NULL) callbacksP2[bitloc]();
+ fall2 -= _BV(bitloc);
+ }
+}
#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/arduino.cpp b/Marlin/src/HAL/HAL_LPC1768/arduino.cpp
index 8fc7657790d5..abdc6b353903 100644
--- a/Marlin/src/HAL/HAL_LPC1768/arduino.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/arduino.cpp
@@ -26,6 +26,7 @@
#include
#include "../../inc/MarlinConfig.h"
+#include "../Delay.h"
// Interrupts
void cli(void) { __disable_irq(); } // Disable
@@ -40,26 +41,9 @@ uint32_t millis() {
return _millis;
}
+// This is required for some Arduino libraries we are using
void delayMicroseconds(uint32_t us) {
- static const int nop_factor = (SystemCoreClock / 11000000);
- static volatile int loops = 0;
-
- //previous ops already burned most of 1us, burn the rest
- loops = nop_factor / 4; //measured at 1us
- while (loops > 0) --loops;
-
- if (us < 2) return;
- us--;
-
- //redirect to delay for large values, then set new delay to remainder
- if (us > 1000) {
- delay(us / 1000);
- us = us % 1000;
- }
-
- // burn cycles, time in interrupts will not be taken into account
- loops = us * nop_factor;
- while (loops > 0) --loops;
+ DELAY_US(us);
}
extern "C" void delay(const int msec) {
diff --git a/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h b/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
index 1bb8586a28ba..48312ccc072e 100644
--- a/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
@@ -24,7 +24,7 @@
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
- * the stepper-ISR via endstops.update(), most of the time finding no change.
+ * the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
@@ -34,35 +34,67 @@
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
*/
- #ifndef _ENDSTOP_INTERRUPTS_H_
- #define _ENDSTOP_INTERRUPTS_H_
+#ifndef _ENDSTOP_INTERRUPTS_H_
+#define _ENDSTOP_INTERRUPTS_H_
+
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
void setup_endstop_interrupts(void) {
#if HAS_X_MAX
- attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
+ #if !LPC1768_PIN_INTERRUPT_M(X_MAX_PIN)
+ #error "X_MAX_PIN is not an INTERRUPT capable pin."
+ #endif
+ attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_X_MIN
+ #if !LPC1768_PIN_INTERRUPT_M(X_MIN_PIN)
+ #error "X_MIN_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Y_MAX
+ #if !LPC1768_PIN_INTERRUPT_M(Y_MAX_PIN)
+ #error "Y_MAX_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Y_MIN
+ #if !LPC1768_PIN_INTERRUPT_M(Y_MIN_PIN)
+ #error "Y_MIN_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Z_MAX
+ #if !LPC1768_PIN_INTERRUPT_M(Z_MAX_PIN)
+ #error "Z_MAX_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Z_MIN
+ #if !LPC1768_PIN_INTERRUPT_M(Z_MIN_PIN)
+ #error "Z_MIN_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Z2_MAX
+ #if !LPC1768_PIN_INTERRUPT_M(Z2_MAX_PIN)
+ #error "Z2_MAX_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Z2_MIN
+ #if !LPC1768_PIN_INTERRUPT_M(Z2_MIN_PIN)
+ #error "Z2_MIN_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
#endif
#if HAS_Z_MIN_PROBE_PIN
+ #if !LPC1768_PIN_INTERRUPT_M(Z_MIN_PROBE_PIN)
+ #error "Z_MIN_PROBE_PIN is not an INTERRUPT capable pin."
+ #endif
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
#endif
}
diff --git a/Marlin/src/HAL/HAL_LPC1768/fastio.h b/Marlin/src/HAL/HAL_LPC1768/fastio.h
index e19500141f8b..5f55f73c8666 100644
--- a/Marlin/src/HAL/HAL_LPC1768/fastio.h
+++ b/Marlin/src/HAL/HAL_LPC1768/fastio.h
@@ -55,7 +55,7 @@ bool useable_hardware_PWM(pin_t pin);
#define WRITE_PIN_CLR(IO) (LPC_GPIO(LPC1768_PIN_PORT(IO))->FIOCLR = LPC_PIN(LPC1768_PIN_PIN(IO)))
#define READ_PIN(IO) ((LPC_GPIO(LPC1768_PIN_PORT(IO))->FIOPIN & LPC_PIN(LPC1768_PIN_PIN(IO))) ? 1 : 0)
-#define WRITE_PIN(IO, v) ((v) ? WRITE_PIN_SET(IO) : WRITE_PIN_CLR(IO))
+#define WRITE_PIN(IO,V) ((V) ? WRITE_PIN_SET(IO) : WRITE_PIN_CLR(IO))
/**
* Magic I/O routines
@@ -66,76 +66,66 @@ bool useable_hardware_PWM(pin_t pin);
*/
/// Read a pin
-#define _READ(IO) READ_PIN(IO)
+#define _READ(IO) READ_PIN(IO)
/// Write to a pin
-#define _WRITE_VAR(IO, v) digitalWrite(IO, v)
+#define _WRITE_VAR(IO,V) digitalWrite(IO,V)
-#define _WRITE(IO, v) WRITE_PIN(IO, v)
+#define _WRITE(IO,V) WRITE_PIN(IO,V)
/// toggle a pin
-#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
+#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
/// set pin as input
-#define _SET_INPUT(IO) SET_DIR_INPUT(IO)
+#define _SET_INPUT(IO) SET_DIR_INPUT(IO)
/// set pin as output
-#define _SET_OUTPUT(IO) SET_DIR_OUTPUT(IO)
+#define _SET_OUTPUT(IO) SET_DIR_OUTPUT(IO)
/// set pin as input with pullup mode
-#define _PULLUP(IO, v) (pinMode(IO, (v!=LOW ? INPUT_PULLUP : INPUT)))
+#define _PULLUP(IO,V) pinMode(IO, (V) ? INPUT_PULLUP : INPUT)
/// set pin as input with pulldown mode
-#define _PULLDOWN(IO, v) (pinMode(IO, (v!=LOW ? INPUT_PULLDOWN : INPUT)))
-
-// hg42: all pins can be input or output (I hope)
-// hg42: undefined pins create compile error (IO, is no pin)
-// hg42: currently not used, but was used by pinsDebug
+#define _PULLDOWN(IO,V) pinMode(IO, (V) ? INPUT_PULLDOWN : INPUT)
/// check if pin is an input
-#define _GET_INPUT(IO) (LPC1768_PIN_PIN(IO)>=0)
+#define _GET_INPUT(IO) (LPC_GPIO(LPC1768_PIN_PORT(IO))->FIODIR & LPC_PIN(LPC1768_PIN_PIN(IO)) != 0)
/// check if pin is an output
-#define _GET_OUTPUT(IO) (LPC1768_PIN_PIN(IO)>=0)
-
-// hg42: GET_TIMER is used only to check if it's a PWM pin
-// hg42: we cannot use USEABLE_HARDWARE_PWM because it uses a function that cannot be used statically
-// hg42: instead use PWM bit from the #define
+#define _GET_OUTPUT(IO) (LPC_GPIO(LPC1768_PIN_PORT(IO))->FIODIR & LPC_PIN(LPC1768_PIN_PIN(IO)) == 0)
/// check if pin is a timer
-#define _GET_TIMER(IO) TRUE // could be LPC1768_PIN_PWM(IO), but there
-// hg42: could be this:
-// #define _GET_TIMER(IO) LPC1768_PIN_PWM(IO)
-// but this is an incomplete check (12 pins are PWMable, but only 6 can be used at the same time)
+/// all gpio pins are pwm capable, either interrupt or hardware pwm controlled
+#define _GET_TIMER(IO) TRUE
/// Read a pin wrapper
-#define READ(IO) _READ(IO)
+#define READ(IO) _READ(IO)
/// Write to a pin wrapper
-#define WRITE_VAR(IO, v) _WRITE_VAR(IO, v)
-#define WRITE(IO, v) _WRITE(IO, v)
+#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
+#define WRITE(IO,V) _WRITE(IO,V)
/// toggle a pin wrapper
-#define TOGGLE(IO) _TOGGLE(IO)
+#define TOGGLE(IO) _TOGGLE(IO)
/// set pin as input wrapper
-#define SET_INPUT(IO) _SET_INPUT(IO)
+#define SET_INPUT(IO) _SET_INPUT(IO)
/// set pin as input with pullup wrapper
-#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
+#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
/// set pin as input with pulldown wrapper
-#define SET_INPUT_PULLDOWN(IO) do{ _SET_INPUT(IO); _PULLDOWN(IO, HIGH); }while(0)
+#define SET_INPUT_PULLDOWN(IO) do{ _SET_INPUT(IO); _PULLDOWN(IO, HIGH); }while(0)
/// set pin as output wrapper - reads the pin and sets the output to that value
-#define SET_OUTPUT(IO) do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0)
+#define SET_OUTPUT(IO) do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0)
/// check if pin is an input wrapper
-#define GET_INPUT(IO) _GET_INPUT(IO)
+#define GET_INPUT(IO) _GET_INPUT(IO)
/// check if pin is an output wrapper
-#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
+#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
/// check if pin is a timer (wrapper)
-#define GET_TIMER(IO) _GET_TIMER(IO)
+#define GET_TIMER(IO) _GET_TIMER(IO)
// Shorthand
-#define OUT_WRITE(IO, v) { SET_OUTPUT(IO); WRITE(IO, v); }
+#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
#endif // _FASTIO_LPC1768_H
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h b/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h
index 645a9c79ed32..7bc26b1439fd 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h
@@ -50,9 +50,11 @@ typedef uint8_t byte;
#define PSTR(v) (v)
#define PGM_P const char *
+// Used for libraries, preprocessor, and constants
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(x) ((x)>0?(x):-(x))
+
#ifndef isnan
#define isnan std::isnan
#endif
@@ -60,11 +62,6 @@ typedef uint8_t byte;
#define isinf std::isinf
#endif
-//not constexpr until c++14
-//#define max(v1, v2) std::max((int)v1,(int)v2)
-//#define min(v1, v2) std::min((int)v1,(int)v2)
-//#define abs(v) std::abs(v)
-
#define sq(v) ((v) * (v))
#define square(v) sq(v)
#define constrain(value, arg_min, arg_max) ((value) < (arg_min) ? (arg_min) :((value) > (arg_max) ? (arg_max) : (value)))
@@ -72,8 +69,8 @@ typedef uint8_t byte;
//Interrupts
void cli(void); // Disable
void sei(void); // Enable
-void attachInterrupt(uint32_t pin, void (*callback)(void), uint32_t mode);
-void detachInterrupt(uint32_t pin);
+void attachInterrupt(const pin_t pin, void (*callback)(void), uint32_t mode);
+void detachInterrupt(const pin_t pin);
extern "C" void GpioEnableInt(uint32_t port, uint32_t pin, uint32_t mode);
extern "C" void GpioDisableInt(uint32_t port, uint32_t pin);
@@ -95,6 +92,8 @@ extern "C" void GpioDisableInt(uint32_t port, uint32_t pin);
#define vsnprintf_P vsnprintf
#define strcpy_P strcpy
#define snprintf_P snprintf
+#define strlen_P strlen
+#define strchr_P strchr
// Time functions
extern "C" {
diff --git a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp b/Marlin/src/HAL/HAL_LPC1768/include/HardwareSerial.cpp
similarity index 90%
rename from Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp
rename to Marlin/src/HAL/HAL_LPC1768/include/HardwareSerial.cpp
index 6b575ca9d3ea..152b045d55b4 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/include/HardwareSerial.cpp
@@ -22,7 +22,6 @@
#ifdef TARGET_LPC1768
-#include "../../inc/MarlinConfig.h"
#include "HardwareSerial.h"
#if SERIAL_PORT == 0 || SERIAL_PORT_2 == 0
@@ -110,10 +109,23 @@ void HardwareSerial::begin(uint32_t baudrate) {
UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
UART_IntConfig(UARTx, UART_INTCFG_RLS, ENABLE);
- if (UARTx == LPC_UART0) NVIC_EnableIRQ(UART0_IRQn);
- else if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1) NVIC_EnableIRQ(UART1_IRQn);
- else if (UARTx == LPC_UART2) NVIC_EnableIRQ(UART2_IRQn);
- else if (UARTx == LPC_UART3) NVIC_EnableIRQ(UART3_IRQn);
+ // Set proper priority and enable interrupts
+ if (UARTx == LPC_UART0) {
+ NVIC_SetPriority(UART0_IRQn, NVIC_EncodePriority(0, 3, 0));
+ NVIC_EnableIRQ(UART0_IRQn);
+ }
+ else if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1) {
+ NVIC_SetPriority(UART1_IRQn, NVIC_EncodePriority(0, 3, 0));
+ NVIC_EnableIRQ(UART1_IRQn);
+ }
+ else if (UARTx == LPC_UART2) {
+ NVIC_SetPriority(UART2_IRQn, NVIC_EncodePriority(0, 3, 0));
+ NVIC_EnableIRQ(UART2_IRQn);
+ }
+ else if (UARTx == LPC_UART3) {
+ NVIC_SetPriority(UART3_IRQn, NVIC_EncodePriority(0, 3, 0));
+ NVIC_EnableIRQ(UART3_IRQn);
+ }
RxQueueWritePos = RxQueueReadPos = 0;
#if TX_BUFFER_SIZE > 0
@@ -124,8 +136,8 @@ void HardwareSerial::begin(uint32_t baudrate) {
Baudrate = baudrate;
}
-int HardwareSerial::peek() {
- int byte = -1;
+int16_t HardwareSerial::peek() {
+ int16_t byte = -1;
// Temporarily lock out UART receive interrupts during this read so the UART receive
// interrupt won't cause problems with the index values
@@ -140,8 +152,8 @@ int HardwareSerial::peek() {
return byte;
}
-int HardwareSerial::read() {
- int byte = -1;
+int16_t HardwareSerial::read() {
+ int16_t byte = -1;
// Temporarily lock out UART receive interrupts during this read so the UART receive
// interrupt won't cause problems with the index values
@@ -202,7 +214,7 @@ size_t HardwareSerial::write(uint8_t send) {
}
#endif
-int HardwareSerial::available() {
+size_t HardwareSerial::available() {
return (RxQueueWritePos + RX_BUFFER_SIZE - RxQueueReadPos) % RX_BUFFER_SIZE;
}
@@ -211,16 +223,17 @@ void HardwareSerial::flush() {
RxQueueReadPos = 0;
}
-void HardwareSerial::printf(const char *format, ...) {
+size_t HardwareSerial::printf(const char *format, ...) {
char RxBuffer[256];
va_list vArgs;
va_start(vArgs, format);
int length = vsnprintf(RxBuffer, 256, format, vArgs);
va_end(vArgs);
if (length > 0 && length < 256) {
- for (int i = 0; i < length; ++i)
+ for (size_t i = 0; i < (size_t)length; ++i)
write(RxBuffer[i]);
}
+ return length;
}
void HardwareSerial::IRQHandler() {
@@ -248,6 +261,9 @@ void HardwareSerial::IRQHandler() {
if (IIRValue == UART_IIR_INTID_RDA) {
// Clear the FIFO
while (UART_Receive(UARTx, &byte, 1, NONE_BLOCKING)) {
+ #if ENABLED(EMERGENCY_PARSER)
+ emergency_parser.update(emergency_state, byte);
+ #endif
if ((RxQueueWritePos + 1) % RX_BUFFER_SIZE != RxQueueReadPos) {
RxBuffer[RxQueueWritePos] = byte;
RxQueueWritePos = (RxQueueWritePos + 1) % RX_BUFFER_SIZE;
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/HardwareSerial.h b/Marlin/src/HAL/HAL_LPC1768/include/HardwareSerial.h
new file mode 100644
index 000000000000..f3bd2f6b428a
--- /dev/null
+++ b/Marlin/src/HAL/HAL_LPC1768/include/HardwareSerial.h
@@ -0,0 +1,91 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef HARDWARE_SERIAL_H_
+#define HARDWARE_SERIAL_H_
+
+#include "../../../inc/MarlinConfigPre.h"
+#if ENABLED(EMERGENCY_PARSER)
+ #include "../../../feature/emergency_parser.h"
+#endif
+
+#include
+#include
+#include
+
+extern "C" {
+ #include
+ #include "lpc17xx_pinsel.h"
+}
+
+class HardwareSerial : public Stream {
+private:
+ LPC_UART_TypeDef *UARTx;
+
+ uint32_t Baudrate;
+ uint32_t Status;
+ uint8_t RxBuffer[RX_BUFFER_SIZE];
+ uint32_t RxQueueWritePos;
+ uint32_t RxQueueReadPos;
+ #if TX_BUFFER_SIZE > 0
+ uint8_t TxBuffer[TX_BUFFER_SIZE];
+ uint32_t TxQueueWritePos;
+ uint32_t TxQueueReadPos;
+ #endif
+ #if ENABLED(EMERGENCY_PARSER)
+ EmergencyParser::State emergency_state;
+ #endif
+
+public:
+ HardwareSerial(LPC_UART_TypeDef *UARTx)
+ : UARTx(UARTx)
+ , Baudrate(0)
+ , RxQueueWritePos(0)
+ , RxQueueReadPos(0)
+ #if TX_BUFFER_SIZE > 0
+ , TxQueueWritePos(0)
+ , TxQueueReadPos(0)
+ #endif
+ #if ENABLED(EMERGENCY_PARSER)
+ , emergency_state(EmergencyParser::State::EP_RESET)
+ #endif
+ {
+ }
+
+ void begin(uint32_t baudrate);
+ int16_t peek();
+ int16_t read();
+ size_t write(uint8_t send);
+ #if TX_BUFFER_SIZE > 0
+ void flushTX();
+ #endif
+ size_t available();
+ void flush();
+ size_t printf(const char *format, ...);
+
+ operator bool() { return true; }
+
+ void IRQHandler();
+
+};
+
+#endif // MARLIN_SRC_HAL_HAL_SERIAL_H_
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/SPI.h b/Marlin/src/HAL/HAL_LPC1768/include/SPI.h
index 7de136633c39..bcd2d7b54f60 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/SPI.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/SPI.h
@@ -31,13 +31,16 @@
class SPISettings {
public:
- SPISettings(int a, int b, int c) {};
+ SPISettings(uint32_t speed, int, int) : spi_speed(speed) {};
+ uint32_t spiRate() { return spi_speed; }
+ private:
+ uint32_t spi_speed;
};
class SPIClass {
public:
void begin();
- void beginTransaction(SPISettings foo) {};
+ void beginTransaction(SPISettings);
void endTransaction() {};
uint8_t transfer(uint8_t data);
uint16_t transfer16(uint16_t data);
diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp b/Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.cpp
similarity index 93%
rename from Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp
rename to Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.cpp
index 8b6ac025db42..607ea9dcb2f6 100644
--- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.cpp
@@ -36,12 +36,13 @@
// Includes
//
//#include
-#include "../../inc/MarlinConfig.h"
+#include "../../../inc/MarlinConfig.h"
+#include "../../Delay.h"
#include
#include
#include
#include
-#include "fastio.h"
+#include "../fastio.h"
#include "SoftwareSerial.h"
void GpioEnableInt(uint32_t port, uint32_t pin, uint32_t mode);
@@ -66,7 +67,7 @@ typedef struct _DELAY_TABLE {
static const DELAY_TABLE table[] = {
//baud |rxcenter|rxintra |rxstop |tx { 250000, 2, 4, 4, 4, }, //Done but not good due to instruction cycle error { 115200, 4, 8, 8, 8, }, //Done but not good due to instruction cycle error
//{ 74880, 69, 139, 62, 162, }, // estimation
-// { 57600, 100, 185, 1, 208, }, // Done but not good due to instruction cycle error
+ //{ 57600, 100, 185, 1, 208, }, // Done but not good due to instruction cycle error
//{ 38400, 13, 26, 26, 26, }, // Done
//{ 19200, 26, 52, 52, 52, }, // Done { 9600, 52, 104, 104, 104, }, // Done
//{ 4800, 104, 208, 208, 208, },
@@ -78,28 +79,9 @@ static const DELAY_TABLE table[] = {
// Private methods
//
-#if 0
-/* static */
-inline void SoftwareSerial::tunedDelay(const uint32_t count) {
-
- asm volatile(
-
- "mov r3, %[loopsPerMicrosecond] \n\t" //load the initial loop counter
- "1: \n\t"
- "sub r3, r3, #1 \n\t"
- "bne 1b \n\t"
-
- ://empty output list
- :[loopsPerMicrosecond] "r" (count)
- :"r3", "cc" //clobber list
- );
-
-}
-#else
inline void SoftwareSerial::tunedDelay(const uint32_t count) {
- delayMicroseconds(count);
+ DELAY_US(count);
}
-#endif
// This function sets the current object as the "listening"
// one and returns true if it replaces another
@@ -271,7 +253,7 @@ void SoftwareSerial::end() {
// Read data from buffer
-int SoftwareSerial::read() {
+int16_t SoftwareSerial::read() {
if (!isListening()) return -1;
// Empty buffer?
@@ -283,7 +265,7 @@ int SoftwareSerial::read() {
return d;
}
-int SoftwareSerial::available() {
+size_t SoftwareSerial::available() {
if (!isListening()) return 0;
return (_receive_buffer_tail + _SS_MAX_RX_BUFF - _receive_buffer_head) % _SS_MAX_RX_BUFF;
@@ -332,7 +314,7 @@ void SoftwareSerial::flush() {
sei();
}
-int SoftwareSerial::peek() {
+int16_t SoftwareSerial::peek() {
if (!isListening())
return -1;
diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h b/Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.h
similarity index 98%
rename from Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h
rename to Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.h
index 93df76b53a1a..f208e14b0546 100644
--- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/SoftwareSerial.h
@@ -93,11 +93,11 @@ class SoftwareSerial : public Stream
bool isListening() { return this == active_object; }
bool stopListening();
bool overflow() { bool ret = _buffer_overflow; if (ret) _buffer_overflow = false; return ret; }
- int peek();
+ int16_t peek();
virtual size_t write(uint8_t byte);
- virtual int read();
- virtual int available();
+ virtual int16_t read();
+ virtual size_t available();
virtual void flush();
operator bool() { return true; }
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp b/Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp
index fa8149f53578..28e1fa9b56a2 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp
@@ -118,12 +118,12 @@ uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity) {
// perform blocking read into buffer
I2C_M_SETUP_Type transferMCfg;
transferMCfg.sl_addr7bit = address >> 1; // not sure about the right shift
- transferMCfg.tx_data = NULL;
- transferMCfg.tx_length = 0;
- transferMCfg.rx_data = rxBuffer;
- transferMCfg.rx_length = quantity;
- transferMCfg.retransmissions_max = 3;
- I2C_MasterTransferData(I2CDEV_M, &transferMCfg, I2C_TRANSFER_POLLING);
+ transferMCfg.tx_data = NULL;
+ transferMCfg.tx_length = 0;
+ transferMCfg.rx_data = rxBuffer;
+ transferMCfg.rx_length = quantity;
+ transferMCfg.retransmissions_max = 3;
+ I2C_MasterTransferData(I2CDEV_M, &transferMCfg, I2C_TRANSFER_POLLING);
// set rx buffer iterator vars
rxBufferIndex = 0;
@@ -154,11 +154,11 @@ uint8_t TwoWire::endTransmission(void) {
// transmit buffer (blocking)
I2C_M_SETUP_Type transferMCfg;
transferMCfg.sl_addr7bit = txAddress >> 1; // not sure about the right shift
- transferMCfg.tx_data = txBuffer;
- transferMCfg.tx_length = txBufferLength;
- transferMCfg.rx_data = NULL;
- transferMCfg.rx_length = 0;
- transferMCfg.retransmissions_max = 3;
+ transferMCfg.tx_data = txBuffer;
+ transferMCfg.tx_length = txBufferLength;
+ transferMCfg.rx_data = NULL;
+ transferMCfg.rx_length = 0;
+ transferMCfg.retransmissions_max = 3;
Status status = I2C_MasterTransferData(I2CDEV_M, &transferMCfg, I2C_TRANSFER_POLLING);
// reset tx buffer iterator vars
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c b/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
index 3c2bb87c4cd9..6c46c89b0c2e 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
+++ b/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
@@ -23,6 +23,8 @@
// adapted from I2C/master/master.c example
// https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
+#ifdef TARGET_LPC1768
+
#include "../../../inc/MarlinConfigPre.h"
#if MB(MKS_SBASE)
@@ -135,3 +137,4 @@ uint8_t digipot_mcp4451_send_byte(uint8_t data) {
#endif
#endif // MB(MKS_SBASE)
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h b/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h
index 11fdf5cc3a08..de727b8bdea8 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h
@@ -267,7 +267,7 @@ constexpr pin_t adc_pin_table[] = {
// Get the digital pin for an analog index
pin_t analogInputToDigitalPin(const int8_t p);
-
+#define digitalPinToInterrupt(pin) (pin)
// Return the index of a pin number
// The pin number given here is in the form ppp:nnnnn
int16_t GET_PIN_MAP_INDEX(const pin_t pin);
@@ -283,6 +283,7 @@ bool PWM_PIN(const pin_t p);
// Test whether the pin is interruptable
bool INTERRUPT_PIN(const pin_t p);
+#define LPC1768_PIN_INTERRUPT_M(pin) (((pin >> 8) & 0b1) != 0)
// Get the pin number at the given index
pin_t GET_PIN_MAP_PIN(const int16_t ind);
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/serial.h b/Marlin/src/HAL/HAL_LPC1768/include/serial.h
index b0c4b27cd769..3fe8a8cb1dca 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/serial.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/serial.h
@@ -23,178 +23,138 @@
#ifndef _HAL_SERIAL_H_
#define _HAL_SERIAL_H_
+#include "../../../inc/MarlinConfigPre.h"
+#if ENABLED(EMERGENCY_PARSER)
+ #include "../../../feature/emergency_parser.h"
+#endif
+
#include
#include
-
-extern "C" {
-#include
-}
+#include
/**
* Generic RingBuffer
* T type of the buffer array
* S size of the buffer (must be power of 2)
- *
- * todo: optimise
*/
+
template class RingBuffer {
public:
- RingBuffer() { index_read = index_write = 0; }
- uint32_t available() volatile { return buffer_mask & (index_write - index_read); }
- uint32_t free() volatile { return buffer_size - available(); }
- bool empty() volatile { return (buffer_mask & index_read) == (buffer_mask & index_write); }
- bool full() volatile { return index_read == buffer_mask & (index_write + 1); }
- void clear() volatile { index_read = index_write = 0; }
- bool peek(T *value) volatile {
- if (value == 0 || available() == 0)
- return false;
- *value = buffer[buffer_mask & index_read];
+ RingBuffer() {index_read = index_write = 0;}
+
+ uint32_t available() {return mask(index_write - index_read);}
+ uint32_t free() {return buffer_size - available();}
+ bool empty() {return index_read == index_write;}
+ bool full() {return next(index_write) == index_read;}
+ void clear() {index_read = index_write = 0;}
+
+ bool peek(T *const value) {
+ if (value == nullptr || empty()) return false;
+ *value = buffer[index_read];
return true;
}
- int read() volatile {
- if ((buffer_mask & index_read) == (buffer_mask & index_write)) return -1;
- T val = buffer[buffer_mask & index_read];
- ++index_read;
- return val;
+
+ uint32_t read(T *const value) {
+ if (value == nullptr || empty()) return 0;
+ *value = buffer[index_read];
+ index_read = next(index_read);
+ return 1;
}
- bool write(T value) volatile {
- uint32_t next_head = buffer_mask & (index_write + 1);
- if (next_head != index_read) {
- buffer[buffer_mask & index_write] = value;
- index_write = next_head;
- return true;
- }
- return false;
+
+ uint32_t write(T value) {
+ uint32_t next_head = next(index_write);
+ if (next_head == index_read) return 0; // buffer full
+ buffer[index_write] = value;
+ index_write = next_head;
+ return 1;
}
private:
+ inline uint32_t mask(uint32_t val) {
+ return val & buffer_mask;
+ }
+
+ inline uint32_t next(uint32_t val) {
+ return mask(val + 1);
+ }
+
static const uint32_t buffer_size = S;
static const uint32_t buffer_mask = buffer_size - 1;
- volatile T buffer[buffer_size];
+ T buffer[buffer_size];
volatile uint32_t index_write;
volatile uint32_t index_read;
};
-class HalSerial {
+/**
+ * Serial Interface Class
+ * Data is injected directly into, and consumed from, the fifo buffers
+ */
+
+class HalSerial: public Print {
public:
- HalSerial() { host_connected = false; }
- void begin(int32_t baud) {
- }
+ #if ENABLED(EMERGENCY_PARSER)
+ EmergencyParser::State emergency_state;
+ #endif
- int peek() {
+ HalSerial() : host_connected(false) { }
+ virtual ~HalSerial() { }
+
+ operator bool() { return host_connected; }
+
+ void begin(int32_t baud) { }
+
+ int16_t peek() {
uint8_t value;
return receive_buffer.peek(&value) ? value : -1;
}
- int read() { return receive_buffer.read(); }
-
- size_t write(char c) { return host_connected ? transmit_buffer.write((uint8_t)c) : 0; }
+ int16_t read() {
+ uint8_t value;
+ return receive_buffer.read(&value) ? value : -1;
+ }
- operator bool() { return host_connected; }
+ size_t write(const uint8_t c) {
+ if (!host_connected) return 0; // Do not fill buffer when host disconnected
+ while (transmit_buffer.write(c) == 0) { // Block until there is free room in buffer
+ if (!host_connected) return 0; // Break infinite loop on host disconect
+ }
+ return 1;
+ }
- uint16_t available() {
- return (uint16_t)receive_buffer.available();
+ size_t available() {
+ return (size_t)receive_buffer.available();
}
- void flush() { receive_buffer.clear(); }
+ void flush() {
+ receive_buffer.clear();
+ }
- uint8_t availableForWrite(void){
+ uint8_t availableForWrite(void) {
return transmit_buffer.free() > 255 ? 255 : (uint8_t)transmit_buffer.free();
}
- void flushTX(void){
- if (host_connected)
- while (transmit_buffer.available()) { /* nada */ }
+ void flushTX(void) {
+ while (transmit_buffer.available() && host_connected) { /* nada */}
}
- void printf(const char *format, ...) {
+ size_t printf(const char *format, ...) {
static char buffer[256];
va_list vArgs;
va_start(vArgs, format);
int length = vsnprintf((char *) buffer, 256, (char const *) format, vArgs);
va_end(vArgs);
+ size_t i = 0;
if (length > 0 && length < 256) {
- if (host_connected) {
- for (int i = 0; i < length;) {
- if (transmit_buffer.write(buffer[i])) {
- ++i;
- }
- }
+ while (i < (size_t)length && host_connected) {
+ i += transmit_buffer.write(buffer[i]);
}
}
+ return i;
}
- #define DEC 10
- #define HEX 16
- #define OCT 8
- #define BIN 2
-
- void print_bin(uint32_t value, uint8_t num_digits) {
- uint32_t mask = 1 << (num_digits -1);
- for (uint8_t i = 0; i < num_digits; i++) {
- if (!(i % 4) && i) write(' ');
- if (!(i % 16) && i) write(' ');
- if (value & mask) write('1');
- else write('0');
- value <<= 1;
- }
- }
-
- void print(const char value[]) { printf("%s" , value); }
- void print(char value, int nbase = 0) {
- if (nbase == BIN) print_bin(value, 8);
- else if (nbase == OCT) printf("%3o", value);
- else if (nbase == HEX) printf("%2X", value);
- else if (nbase == DEC ) printf("%d", value);
- else printf("%c" , value);
- }
- void print(unsigned char value, int nbase = 0) {
- if (nbase == BIN) print_bin(value, 8);
- else if (nbase == OCT) printf("%3o", value);
- else if (nbase == HEX) printf("%2X", value);
- else printf("%u" , value);
- }
- void print(int value, int nbase = 0) {
- if (nbase == BIN) print_bin(value, 16);
- else if (nbase == OCT) printf("%6o", value);
- else if (nbase == HEX) printf("%4X", value);
- else printf("%d", value);
- }
- void print(unsigned int value, int nbase = 0) {
- if (nbase == BIN) print_bin(value, 16);
- else if (nbase == OCT) printf("%6o", value);
- else if (nbase == HEX) printf("%4X", value);
- else printf("%u" , value);
- }
- void print(long value, int nbase = 0) {
- if (nbase == BIN) print_bin(value, 32);
- else if (nbase == OCT) printf("%11o", value);
- else if (nbase == HEX) printf("%8X", value);
- else printf("%ld" , value);
- }
- void print(unsigned long value, int nbase = 0) {
- if (nbase == BIN) print_bin(value, 32);
- else if (nbase == OCT) printf("%11o", value);
- else if (nbase == HEX) printf("%8X", value);
- else printf("%lu" , value);
- }
- void print(float value, int round = 6) { printf("%f" , value); }
- void print(double value, int round = 6) { printf("%f" , value); }
-
- void println(const char value[]) { printf("%s\n" , value); }
- void println(char value, int nbase = 0) { print(value, nbase); println(); }
- void println(unsigned char value, int nbase = 0) { print(value, nbase); println(); }
- void println(int value, int nbase = 0) { print(value, nbase); println(); }
- void println(unsigned int value, int nbase = 0) { print(value, nbase); println(); }
- void println(long value, int nbase = 0) { print(value, nbase); println(); }
- void println(unsigned long value, int nbase = 0) { print(value, nbase); println(); }
- void println(float value, int round = 6) { printf("%f\n" , value); }
- void println(double value, int round = 6) { printf("%f\n" , value); }
- void println(void) { print('\n'); }
-
- volatile RingBuffer receive_buffer;
- volatile RingBuffer transmit_buffer;
+ RingBuffer receive_buffer;
+ RingBuffer transmit_buffer;
volatile bool host_connected;
};
diff --git a/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py b/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
index 53e500898463..44ded586fe27 100644
--- a/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
+++ b/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
@@ -9,10 +9,10 @@
"-mcpu=cortex-m3",
"-mthumb",
- "-ffreestanding",
"-fsigned-char",
"-fno-move-loop-invariants",
"-fno-strict-aliasing",
+ "-fsingle-precision-constant",
"--specs=nano.specs",
"--specs=nosys.specs",
@@ -22,6 +22,7 @@
# For MarlinFirmware/U8glib-HAL
"-IMarlin/src/HAL/HAL_LPC1768/u8g",
+ "-DU8G_HAL_LINKS",
"-MMD",
"-MP",
@@ -48,12 +49,12 @@
"-fno-threadsafe-statics"
],
LINKFLAGS=[
+ "-Wl,-Tframeworks/CMSIS/LPC1768/system/LPC1768.ld,--gc-sections",
"-Os",
"-mcpu=cortex-m3",
- "-ffreestanding",
"-mthumb",
"--specs=nano.specs",
"--specs=nosys.specs",
- "-u_printf_float",
+ "-u_printf_float"
],
)
diff --git a/Marlin/src/HAL/HAL_LPC1768/main.cpp b/Marlin/src/HAL/HAL_LPC1768/main.cpp
index 1d4dde091e23..5f4e672f385b 100644
--- a/Marlin/src/HAL/HAL_LPC1768/main.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/main.cpp
@@ -35,53 +35,52 @@ extern "C" {
#include "LPC1768_PWM.h"
static __INLINE uint32_t SysTick_Config(uint32_t ticks) {
- if (ticks > SysTick_LOAD_RELOAD_Msk)
- return (1); /* Reload value impossible */
+ if (ticks > SysTick_LOAD_RELOAD_Msk) return 1;
- SysTick->LOAD = (ticks & SysTick_LOAD_RELOAD_Msk) - 1; /* set reload register */
- NVIC_SetPriority(SysTick_IRQn, NVIC_EncodePriority(0, 0, 0)); /* set Priority for Cortex-M3 System Interrupts */
- SysTick->VAL = 0; /* Load the SysTick Counter Value */
+ SysTick->LOAD = (ticks & SysTick_LOAD_RELOAD_Msk) - 1; // Set reload register
+ SysTick->VAL = 0; // Load the SysTick Counter Value
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
- SysTick_CTRL_TICKINT_Msk |
- SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */
- return (0); /* Function successful */
+ SysTick_CTRL_TICKINT_Msk |
+ SysTick_CTRL_ENABLE_Msk; // Enable SysTick IRQ and SysTick Timer
+
+ NVIC_SetPriority(SysTick_IRQn, NVIC_EncodePriority(0, 0, 0)); // Set Priority for Cortex-M3 System Interrupts
+ return 0;
}
extern "C" {
-extern void disk_timerproc(void);
-volatile uint32_t _millis;
-void SysTick_Handler(void) {
- ++_millis;
- disk_timerproc(); /* Disk timer process */
-}
-}
+ extern int isLPC1769();
+ extern void disk_timerproc(void);
+ volatile uint32_t _millis;
-// runs after clock init and before global static constructors
-extern "C" void SystemPostInit() {
- _millis = 0; // initialise the millisecond counter value;
- SysTick_Config(SystemCoreClock / 1000); // start millisecond global counter
- GPIO_SetDir(4, 1UL << 28, 1);
-
- for (int i = 0; i < 4; ++i) {
- GPIO_SetValue(4, 1UL << 28);
- delay(100);
- GPIO_ClearValue(4, 1UL << 28);
- delay(100);
+ void SysTick_Handler(void) {
+ ++_millis;
+ disk_timerproc();
}
-}
-
-// detect 17x[4-8] (100MHz) or 17x9 (120MHz)
-static bool isLPC1769() {
- #define IAP_LOCATION 0x1FFF1FF1
- uint32_t command[1];
- uint32_t result[5];
- typedef void (*IAP)(uint32_t*, uint32_t*);
- IAP iap = (IAP) IAP_LOCATION;
- command[0] = 54;
- iap(command, result);
+ // Runs after clock init and before global static constructors
+ void SystemPostInit() {
+ _millis = 0; // Initialise the millisecond counter value;
+ SysTick_Config(SystemCoreClock / 1000); // Start millisecond global counter
- return ((result[1] & 0x00100000) != 0);
+ // Runs before setup() need to configure LED_PIN and use to indicate succsessful bootloader execution
+ #if PIN_EXISTS(LED)
+ SET_DIR_OUTPUT(LED_PIN);
+ WRITE_PIN_CLR(LED_PIN);
+
+ //MKS-SBASE has 3 other LEDS the bootloader uses during flashing, clear them
+ SET_DIR_OUTPUT(P1_19);
+ WRITE_PIN_CLR(P1_19);
+ SET_DIR_OUTPUT(P1_20);
+ WRITE_PIN_CLR(P1_20);
+ SET_DIR_OUTPUT(P1_21);
+ WRITE_PIN_CLR(P1_21);
+
+ for (int i = 0; i < 6; ++i) {
+ TOGGLE(LED_PIN);
+ delay(100);
+ }
+ #endif
+ }
}
extern uint32_t MSC_SD_Init(uint8_t pdrv);
@@ -96,7 +95,6 @@ int main(void) {
const uint32_t usb_timeout = millis() + 2000;
while (!USB_Configuration && PENDING(millis(), usb_timeout)) {
delay(50);
-
#if PIN_EXISTS(LED)
TOGGLE(LED_PIN); // Flash fast while USB initialisation completes
#endif
@@ -107,7 +105,7 @@ int main(void) {
#if NUM_SERIAL > 1
MYSERIAL1.begin(BAUDRATE);
#endif
- SERIAL_PRINTF("\n\n%s (%dMhz) UART0 Initialised\n", isLPC1769() ? "LPC1769" : "LPC1768", SystemCoreClock / 1000000);
+ SERIAL_PRINTF("\n\necho:%s (%dMhz) Initialised\n", isLPC1769() ? "LPC1769" : "LPC1768", SystemCoreClock / 1000000);
SERIAL_FLUSHTX();
#endif
diff --git a/Marlin/src/HAL/HAL_LPC1768/pinsDebug_LPC1768.h b/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h
similarity index 100%
rename from Marlin/src/HAL/HAL_LPC1768/pinsDebug_LPC1768.h
rename to Marlin/src/HAL/HAL_LPC1768/pinsDebug.h
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp
index 07255aed21b4..9cd913f74312 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp
@@ -55,11 +55,11 @@
#ifdef TARGET_LPC1768
-//#include
+#include "../../inc/MarlinConfigPre.h"
-//#include "src/core/macros.h"
-//#include "Configuration.h"
+#if ENABLED(DOGLCD)
+//#include
#include
#define SPI_FULL_SPEED 0
@@ -132,4 +132,6 @@ uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
return 1;
}
-#endif //TARGET_LPC1768
+#endif // DOGLCD
+
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
index ed12b2c20fcd..06399d39472c 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
@@ -77,113 +77,127 @@
#ifdef TARGET_LPC1768
- #include
-
- #define I2C_SLA (0x3c*2)
- //#define I2C_CMD_MODE 0x080
- #define I2C_CMD_MODE 0x000
- #define I2C_DATA_MODE 0x040
-
- //#define U8G_I2C_OPT_FAST 16
-
- uint8_t u8g_com_ssd_I2C_start_sequence(u8g_t *u8g) {
- /* are we requested to set the a0 state? */
- if (u8g->pin_list[U8G_PI_SET_A0] == 0) return 1;
-
- /* setup bus, might be a repeated start */
- if (u8g_i2c_start(I2C_SLA) == 0)
- return 0;
- if (u8g->pin_list[U8G_PI_A0_STATE] == 0 ) {
- if (u8g_i2c_send_byte(I2C_CMD_MODE) == 0) return 0;
- }
- else if (u8g_i2c_send_byte(I2C_DATA_MODE) == 0)
- return 0;
-
- u8g->pin_list[U8G_PI_SET_A0] = 0;
- return 1;
- }
+#include "../../inc/MarlinConfigPre.h"
- uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
- switch(msg) {
- case U8G_COM_MSG_INIT:
- //u8g_com_arduino_digital_write(u8g, U8G_PI_SCL, HIGH);
- //u8g_com_arduino_digital_write(u8g, U8G_PI_SDA, HIGH);
- //u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: unknown mode */
-
- u8g_i2c_init(u8g->pin_list[U8G_PI_I2C_OPTION]);
- u8g_com_ssd_I2C_start_sequence(u8g);
- break;
-
- case U8G_COM_MSG_STOP:
- break;
-
- case U8G_COM_MSG_RESET:
- /* Currently disabled, but it could be enable. Previous restrictions have been removed */
- /* u8g_com_arduino_digital_write(u8g, U8G_PI_RESET, arg_val); */
- break;
-
- case U8G_COM_MSG_CHIP_SELECT:
- u8g->pin_list[U8G_PI_A0_STATE] = 0;
- u8g->pin_list[U8G_PI_SET_A0] = 1; /* force a0 to set again, also forces start condition */
- if (arg_val == 0 ) {
- /* disable chip, send stop condition */
- u8g_i2c_stop();
+#if ENABLED(DOGLCD)
+
+#include
+
+#define I2C_SLA (0x3C*2)
+//#define I2C_CMD_MODE 0x080
+#define I2C_CMD_MODE 0x000
+#define I2C_DATA_MODE 0x040
+
+//#define U8G_I2C_OPT_FAST 16
+
+uint8_t u8g_com_ssd_I2C_start_sequence(u8g_t *u8g) {
+ /* are we requested to set the a0 state? */
+ if (u8g->pin_list[U8G_PI_SET_A0] == 0) return 1;
+
+ /* setup bus, might be a repeated start */
+ if (u8g_i2c_start(I2C_SLA) == 0)
+ return 0;
+ if (u8g->pin_list[U8G_PI_A0_STATE] == 0 ) {
+ if (u8g_i2c_send_byte(I2C_CMD_MODE) == 0) return 0;
+ }
+ else if (u8g_i2c_send_byte(I2C_DATA_MODE) == 0)
+ return 0;
+
+ u8g->pin_list[U8G_PI_SET_A0] = 0;
+ return 1;
+}
+
+uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
+ switch(msg) {
+ case U8G_COM_MSG_INIT:
+ //u8g_com_arduino_digital_write(u8g, U8G_PI_SCL, HIGH);
+ //u8g_com_arduino_digital_write(u8g, U8G_PI_SDA, HIGH);
+ //u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: unknown mode */
+
+ u8g_i2c_init(u8g->pin_list[U8G_PI_I2C_OPTION]);
+ u8g_com_ssd_I2C_start_sequence(u8g);
+ break;
+
+ case U8G_COM_MSG_STOP:
+ break;
+
+ case U8G_COM_MSG_RESET:
+ /* Currently disabled, but it could be enable. Previous restrictions have been removed */
+ /* u8g_com_arduino_digital_write(u8g, U8G_PI_RESET, arg_val); */
+ break;
+
+ case U8G_COM_MSG_CHIP_SELECT:
+ u8g->pin_list[U8G_PI_A0_STATE] = 0;
+ u8g->pin_list[U8G_PI_SET_A0] = 1; /* force a0 to set again, also forces start condition */
+ if (arg_val == 0 ) {
+ /* disable chip, send stop condition */
+ u8g_i2c_stop();
+ }
+ else {
+ /* enable, do nothing: any byte writing will trigger the i2c start */
+ }
+ break;
+
+ case U8G_COM_MSG_WRITE_BYTE:
+ //u8g->pin_list[U8G_PI_SET_A0] = 1;
+ //if (u8g_com_arduino_ssd_start_sequence(u8g) == 0)
+ // return u8g_i2c_stop(), 0;
+ if (u8g_i2c_send_byte(arg_val) == 0) {
+ u8g_i2c_stop();
+ return 0;
+ }
+ // u8g_i2c_stop();
+ break;
+
+ case U8G_COM_MSG_WRITE_SEQ: {
+ //u8g->pin_list[U8G_PI_SET_A0] = 1;
+ if (u8g_com_ssd_I2C_start_sequence(u8g) == 0) {
+ u8g_i2c_stop();
+ return 0;
}
- else {
- /* enable, do nothing: any byte writing will trigger the i2c start */
+
+ register uint8_t *ptr = (uint8_t *)arg_ptr;
+ while (arg_val > 0) {
+ if (u8g_i2c_send_byte(*ptr++) == 0) {
+ u8g_i2c_stop();
+ return 0;
+ }
+ arg_val--;
}
- break;
+ }
+ // u8g_i2c_stop();
+ break;
- case U8G_COM_MSG_WRITE_BYTE:
- //u8g->pin_list[U8G_PI_SET_A0] = 1;
- //if (u8g_com_arduino_ssd_start_sequence(u8g) == 0)
- // return u8g_i2c_stop(), 0;
- if (u8g_i2c_send_byte(arg_val) == 0)
- return u8g_i2c_stop(), 0;
- // u8g_i2c_stop();
- break;
-
- case U8G_COM_MSG_WRITE_SEQ: {
+ case U8G_COM_MSG_WRITE_SEQ_P: {
//u8g->pin_list[U8G_PI_SET_A0] = 1;
- if (u8g_com_ssd_I2C_start_sequence(u8g) == 0)
- return u8g_i2c_stop(), 0;
-
- register uint8_t *ptr = (uint8_t *)arg_ptr;
- while (arg_val > 0) {
- if (u8g_i2c_send_byte(*ptr++) == 0)
- return u8g_i2c_stop(), 0;
- arg_val--;
- }
+ if (u8g_com_ssd_I2C_start_sequence(u8g) == 0) {
+ u8g_i2c_stop();
+ return 0;
}
- // u8g_i2c_stop();
- break;
-
- case U8G_COM_MSG_WRITE_SEQ_P: {
- //u8g->pin_list[U8G_PI_SET_A0] = 1;
- if (u8g_com_ssd_I2C_start_sequence(u8g) == 0)
- return u8g_i2c_stop(), 0;
-
- register uint8_t *ptr = (uint8_t *)arg_ptr;
- while (arg_val > 0) {
- if (u8g_i2c_send_byte(u8g_pgm_read(ptr)) == 0)
- return 0;
- ptr++;
- arg_val--;
- }
+
+ register uint8_t *ptr = (uint8_t *)arg_ptr;
+ while (arg_val > 0) {
+ if (u8g_i2c_send_byte(u8g_pgm_read(ptr)) == 0)
+ return 0;
+ ptr++;
+ arg_val--;
}
- // u8g_i2c_stop();
- break;
+ }
+ // u8g_i2c_stop();
+ break;
- case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
- u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
- u8g->pin_list[U8G_PI_SET_A0] = 1; /* force a0 to set again */
+ case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
+ u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
+ u8g->pin_list[U8G_PI_SET_A0] = 1; /* force a0 to set again */
- u8g_i2c_start(0); // send slave address and write bit
- u8g_i2c_send_byte(arg_val ? 0x40 : 0x80); // Write to ? Graphics DRAM mode : Command mode
- break;
+ u8g_i2c_start(0); // send slave address and write bit
+ u8g_i2c_send_byte(arg_val ? 0x40 : 0x80); // Write to ? Graphics DRAM mode : Command mode
+ break;
- } // switch
- return 1;
- }
+ } // switch
+ return 1;
+}
+
+#endif // DOGLCD
#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
index 5101ee13cd1b..80c8da7239a0 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
@@ -61,17 +61,20 @@
#ifdef TARGET_LPC1768
- #include
+#include "../../inc/MarlinConfigPre.h"
+
+#if ENABLED(DOGLCD)
+
+#include
-void delayMicroseconds(uint32_t us);
//void pinMode(int16_t pin, uint8_t mode);
//void digitalWrite(int16_t pin, uint8_t pin_status);
- #define I2C_SLA (0x3c*2)
- //#define I2C_CMD_MODE 0x080
- #define I2C_CMD_MODE 0x000
- #define I2C_DATA_MODE 0x040
+#define I2C_SLA (0x3C*2)
+//#define I2C_CMD_MODE 0x080
+#define I2C_CMD_MODE 0x000
+#define I2C_DATA_MODE 0x040
//static uint8_t I2C_speed; // 3 - 400KHz, 13 - 100KHz
//#define SPEED_400KHz 3
@@ -122,13 +125,13 @@ uint8_t u8g_i2c_start_sw(uint8_t sla) { // assert start condition and then send
LPC_GPIO(SDA_port_HAL_LPC1768_sw_I2C)->FIOCLR = LPC_PIN(SDA_pin_HAL_LPC1768_sw_I2C);
LPC_GPIO(SCL_port_HAL_LPC1768_sw_I2C)->FIOCLR = LPC_PIN(SCL_pin_HAL_LPC1768_sw_I2C);
- delayMicroseconds(2);
+ DELAY_US(2);
LPC_GPIO(SCL_port_HAL_LPC1768_sw_I2C)->FIOSET = LPC_PIN(SCL_pin_HAL_LPC1768_sw_I2C);
- delayMicroseconds(2);
+ DELAY_US(2);
LPC_GPIO(SDA_port_HAL_LPC1768_sw_I2C)->FIOSET = LPC_PIN(SDA_pin_HAL_LPC1768_sw_I2C);
- delayMicroseconds(2);
+ DELAY_US(2);
LPC_GPIO(SDA_port_HAL_LPC1768_sw_I2C)->FIOCLR = LPC_PIN(SDA_pin_HAL_LPC1768_sw_I2C);
- delayMicroseconds(2);
+ DELAY_US(2);
LPC_GPIO(SCL_port_HAL_LPC1768_sw_I2C)->FIOCLR = LPC_PIN(SCL_pin_HAL_LPC1768_sw_I2C);
u8g_i2c_send_byte_sw(I2C_SLA); // send slave address with write bit
@@ -246,4 +249,6 @@ uint8_t u8g_com_HAL_LPC1768_ssd_sw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
return 1;
}
-#endif // TARGET_LPC1768
+#endif // DOGLCD
+
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
index a1c7f7a3c5bd..c61fa4a8cefa 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
@@ -55,103 +55,99 @@
#ifdef TARGET_LPC1768
- //#include
- //#include "src/core/macros.h"
- //#include "Configuration.h"
+#include "../../inc/MarlinConfigPre.h"
- #include
+#if ENABLED(DOGLCD)
- #define SPI_FULL_SPEED 0
- #define SPI_HALF_SPEED 1
- #define SPI_QUARTER_SPEED 2
- #define SPI_EIGHTH_SPEED 3
- #define SPI_SIXTEENTH_SPEED 4
- #define SPI_SPEED_5 5
- #define SPI_SPEED_6 6
+//#include
+#include
+#include "../Delay.h"
+#define SPI_FULL_SPEED 0
+#define SPI_HALF_SPEED 1
+#define SPI_QUARTER_SPEED 2
+#define SPI_EIGHTH_SPEED 3
+#define SPI_SIXTEENTH_SPEED 4
+#define SPI_SPEED_5 5
+#define SPI_SPEED_6 6
- void spiBegin();
- void spiInit(uint8_t spiRate);
- void spiSend(uint8_t b);
- void spiSend(const uint8_t* buf, size_t n);
+void spiBegin();
+void spiInit(uint8_t spiRate);
+void spiSend(uint8_t b);
+void spiSend(const uint8_t* buf, size_t n);
+static uint8_t rs_last_state = 255;
- static uint8_t rs_last_state = 255;
+static void u8g_com_LPC1768_st7920_write_byte_hw_spi(uint8_t rs, uint8_t val) {
- static void u8g_com_LPC1768_st7920_write_byte_hw_spi(uint8_t rs, uint8_t val)
- {
- uint8_t i;
+ if ( rs != rs_last_state) { // time to send a command/data byte
+ rs_last_state = rs;
- if ( rs != rs_last_state) { // time to send a command/data byte
- rs_last_state = rs;
+ if ( rs == 0 )
+ /* command */
+ spiSend(0x0F8);
+ else
+ /* data */
+ spiSend(0x0FA);
- if ( rs == 0 )
- /* command */
- spiSend(0x0f8);
- else
- /* data */
- spiSend(0x0fa);
-
- for( i = 0; i < 4; i++ ) // give the controller some time to process the data
- u8g_10MicroDelay(); // 2 is bad, 3 is OK, 4 is safe
- }
-
- spiSend(val & 0x0f0);
- spiSend(val << 4);
+ DELAY_US(40); // give the controller some time to process the data: 20 is bad, 30 is OK, 40 is safe
}
-
- uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)
- {
- switch(msg)
- {
- case U8G_COM_MSG_INIT:
- u8g_SetPILevel(u8g, U8G_PI_CS, 0);
- u8g_SetPIOutput(u8g, U8G_PI_CS);
- u8g_Delay(5);
- spiBegin();
- spiInit(SPI_EIGHTH_SPEED); // ST7920 max speed is about 1.1 MHz
- u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: command mode */
- break;
-
- case U8G_COM_MSG_STOP:
- break;
-
- case U8G_COM_MSG_RESET:
- u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val);
- break;
-
- case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
- u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
- break;
-
- case U8G_COM_MSG_CHIP_SELECT:
- u8g_SetPILevel(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select
- break;
-
- case U8G_COM_MSG_WRITE_BYTE:
- u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
- break;
-
- case U8G_COM_MSG_WRITE_SEQ: {
- uint8_t *ptr = (uint8_t*) arg_ptr;
- while (arg_val > 0) {
- u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
- arg_val--;
- }
+ spiSend(val & 0x0F0);
+ spiSend(val << 4);
+}
+
+uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
+ switch(msg) {
+ case U8G_COM_MSG_INIT:
+ u8g_SetPILevel(u8g, U8G_PI_CS, 0);
+ u8g_SetPIOutput(u8g, U8G_PI_CS);
+ u8g_Delay(5);
+ spiBegin();
+ spiInit(SPI_EIGHTH_SPEED); // ST7920 max speed is about 1.1 MHz
+ u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: command mode */
+ break;
+
+ case U8G_COM_MSG_STOP:
+ break;
+
+ case U8G_COM_MSG_RESET:
+ u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val);
+ break;
+
+ case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
+ u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
+ break;
+
+ case U8G_COM_MSG_CHIP_SELECT:
+ u8g_SetPILevel(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select
+ break;
+
+ case U8G_COM_MSG_WRITE_BYTE:
+ u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
+ break;
+
+ case U8G_COM_MSG_WRITE_SEQ: {
+ uint8_t *ptr = (uint8_t*) arg_ptr;
+ while (arg_val > 0) {
+ u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
+ arg_val--;
}
- break;
-
- case U8G_COM_MSG_WRITE_SEQ_P: {
- uint8_t *ptr = (uint8_t*) arg_ptr;
- while (arg_val > 0) {
- u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
- arg_val--;
- }
+ }
+ break;
+
+ case U8G_COM_MSG_WRITE_SEQ_P: {
+ uint8_t *ptr = (uint8_t*) arg_ptr;
+ while (arg_val > 0) {
+ u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
+ arg_val--;
}
- break;
- }
- return 1;
+ }
+ break;
}
+ return 1;
+}
+
+#endif // DOGLCD
-#endif // TARGET_LPC1768
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
index 89502a3d7190..700ed5946320 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
@@ -55,97 +55,101 @@
#ifdef TARGET_LPC1768
- #include
- #include "SoftwareSPI.h"
+#include "../../inc/MarlinConfigPre.h"
- #define SPI_SPEED 3 // About 1 MHz
+#if ENABLED(DOGLCD)
- static pin_t SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL;
- static uint8_t SPI_speed = 0;
- static uint8_t rs_last_state = 255;
+#include
+#include "SoftwareSPI.h"
+#include "../Delay.h"
- static void u8g_com_LPC1768_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val)
- {
- uint8_t i;
+#define SPI_SPEED 3 // About 1 MHz
+
+static pin_t SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL;
+static uint8_t SPI_speed = 0;
+static uint8_t rs_last_state = 255;
- if ( rs != rs_last_state) { // time to send a command/data byte
- rs_last_state = rs;
+static void u8g_com_LPC1768_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) {
- if ( rs == 0 )
- /* command */
- swSpiTransfer(0x0f8, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
- else
- /* data */
- swSpiTransfer(0x0fa, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
+ if (rs != rs_last_state) { // time to send a command/data byte
+ rs_last_state = rs;
- for( i = 0; i < 4; i++ ) // give the controller some time to process the data
- u8g_10MicroDelay(); // 2 is bad, 3 is OK, 4 is safe
- }
+ if (rs == 0)
+ /* command */
+ swSpiTransfer(0x0F8, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
+ else
+ /* data */
+ swSpiTransfer(0x0FA, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
- swSpiTransfer(val & 0x0f0, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
- swSpiTransfer(val << 4, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
+ DELAY_US(40); // give the controller some time to process the data: 20 is bad, 30 is OK, 40 is safe
}
- uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)
+ swSpiTransfer(val & 0x0F0, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
+ swSpiTransfer(val << 4, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL);
+}
+
+uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr)
+{
+ switch(msg)
{
- switch(msg)
- {
- case U8G_COM_MSG_INIT:
- SCK_pin_ST7920_HAL = u8g->pin_list[U8G_PI_SCK];
- MOSI_pin_ST7920_HAL_HAL = u8g->pin_list[U8G_PI_MOSI];
-
- u8g_SetPIOutput(u8g, U8G_PI_CS);
- u8g_SetPIOutput(u8g, U8G_PI_SCK);
- u8g_SetPIOutput(u8g, U8G_PI_MOSI);
- u8g_Delay(5);
-
- SPI_speed = swSpiInit(SPI_SPEED, SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL);
-
- u8g_SetPILevel(u8g, U8G_PI_CS, 0);
- u8g_SetPILevel(u8g, U8G_PI_SCK, 0);
- u8g_SetPILevel(u8g, U8G_PI_MOSI, 0);
-
- u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: command mode */
- break;
-
- case U8G_COM_MSG_STOP:
- break;
-
- case U8G_COM_MSG_RESET:
- if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val);
- break;
-
- case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
- u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
- break;
-
- case U8G_COM_MSG_CHIP_SELECT:
- if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_CS]) u8g_SetPILevel(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select
- break;
-
- case U8G_COM_MSG_WRITE_BYTE:
- u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
- break;
-
- case U8G_COM_MSG_WRITE_SEQ: {
- uint8_t *ptr = (uint8_t*) arg_ptr;
- while (arg_val > 0) {
- u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
- arg_val--;
- }
+ case U8G_COM_MSG_INIT:
+ SCK_pin_ST7920_HAL = u8g->pin_list[U8G_PI_SCK];
+ MOSI_pin_ST7920_HAL_HAL = u8g->pin_list[U8G_PI_MOSI];
+
+ u8g_SetPIOutput(u8g, U8G_PI_CS);
+ u8g_SetPIOutput(u8g, U8G_PI_SCK);
+ u8g_SetPIOutput(u8g, U8G_PI_MOSI);
+ u8g_Delay(5);
+
+ SPI_speed = swSpiInit(SPI_SPEED, SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL);
+
+ u8g_SetPILevel(u8g, U8G_PI_CS, 0);
+ u8g_SetPILevel(u8g, U8G_PI_SCK, 0);
+ u8g_SetPILevel(u8g, U8G_PI_MOSI, 0);
+
+ u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: command mode */
+ break;
+
+ case U8G_COM_MSG_STOP:
+ break;
+
+ case U8G_COM_MSG_RESET:
+ if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val);
+ break;
+
+ case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
+ u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
+ break;
+
+ case U8G_COM_MSG_CHIP_SELECT:
+ if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_CS]) u8g_SetPILevel(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select
+ break;
+
+ case U8G_COM_MSG_WRITE_BYTE:
+ u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
+ break;
+
+ case U8G_COM_MSG_WRITE_SEQ: {
+ uint8_t *ptr = (uint8_t*) arg_ptr;
+ while (arg_val > 0) {
+ u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
+ arg_val--;
}
- break;
-
- case U8G_COM_MSG_WRITE_SEQ_P: {
- uint8_t *ptr = (uint8_t*) arg_ptr;
- while (arg_val > 0) {
- u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
- arg_val--;
- }
+ }
+ break;
+
+ case U8G_COM_MSG_WRITE_SEQ_P: {
+ uint8_t *ptr = (uint8_t*) arg_ptr;
+ while (arg_val > 0) {
+ u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
+ arg_val--;
}
- break;
- }
- return 1;
+ }
+ break;
}
+ return 1;
+}
+
+#endif // DOGLCD
-#endif //TARGET_LPC1768
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp
index 64a4dd99c330..533ebda37cee 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp
@@ -55,6 +55,10 @@
#ifdef TARGET_LPC1768
+#include "../../inc/MarlinConfigPre.h"
+
+#if ENABLED(DOGLCD)
+
#include
#include "SoftwareSPI.h"
@@ -120,4 +124,6 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
return 1;
}
+#endif // DOGLCD
+
#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py b/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py
new file mode 100644
index 000000000000..aa24cacc45f7
--- /dev/null
+++ b/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py
@@ -0,0 +1,148 @@
+#
+# sets output_port
+# if target_filename is found then that drive is used
+# else if target_drive is found then that drive is used
+#
+
+target_filename = "FIRMWARE.CUR"
+target_drive = "REARM"
+
+import os
+import platform
+current_OS = platform.system()
+
+#env_vars = subprocess.check_output('platformio run -t envdump')
+#env_vars = env_vars.split('\n')
+#for env in env_vars:
+# print env
+#exit(0)
+
+build_type = os.environ.get("BUILD_TYPE", 'Not Set')
+if build_type == 'upload' or build_type == 'traceback' or build_type == 'Not Set' :
+
+ if current_OS == 'Windows':
+
+ #
+ # platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
+ # Windows - doesn't care about the disk's name, only cares about the drive letter
+ #
+
+ #
+ # get all drives on this computer
+ #
+
+ import subprocess
+
+ driveStr = subprocess.check_output("fsutil fsinfo drives") # typical result (string): 'Drives: C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\'
+ driveStr = driveStr.strip().lstrip('Drives: ') # typical result (string): 'C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\'
+ drives = driveStr.split() # typical result (array of stings): ['C:\\', 'D:\\', 'E:\\', 'F:\\', 'G:\\', 'H:\\', 'I:\\', 'J:\\', 'K:\\', 'L:\\', 'M:\\', 'Y:\\', 'Z:\\']
+
+ upload_disk = 'Disk not found'
+ target_file_found = False
+ target_drive_found = False
+ for drive in drives:
+ final_drive_name = drive.strip().rstrip('\\') # typical result (string): 'C:'
+ try:
+ volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT)
+ except Exception as e:
+ continue
+ else:
+ if target_drive in volume_info and target_file_found == False: # set upload if not found target file yet
+ target_drive_found = True
+ upload_disk = final_drive_name
+ if target_filename in volume_info:
+ if target_file_found == False:
+ upload_disk = final_drive_name
+ target_file_found = True
+
+ #
+ # set upload_port to drive if found
+ #
+
+ if target_file_found == True or target_drive_found == True:
+ Import("env")
+ env.Replace(
+ UPLOAD_PORT = upload_disk
+ )
+ print 'upload disk: ' , upload_disk
+ else:
+ print '\nUnable to find destination disk. File must be copied manually. \n'
+
+
+ if current_OS == 'Linux':
+
+ #
+ # platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
+ #
+
+ upload_disk = 'Disk not found'
+ target_file_found = False
+ target_drive_found = False
+ medias = os.listdir('/media') #
+ for media in medias:
+ drives = os.listdir('/media/' + media) #
+ if target_drive in drives and target_file_found == False: # set upload if not found target file yet
+ target_drive_found = True
+ upload_disk = '/media/' + media + '/' + target_drive + '/'
+ for drive in drives:
+ try:
+ files = os.listdir('/media/' + media + '/' + drive )
+ except:
+ continue
+ else:
+ if target_filename in files:
+ if target_file_found == False:
+ upload_disk = '/media/' + media + '/' + drive + '/'
+ target_file_found = True
+
+ #
+ # set upload_port to drive if found
+ #
+
+ if target_file_found == True or target_drive_found == True:
+ Import("env")
+ env.Replace(
+ UPLOAD_FLAGS = "-P$UPLOAD_PORT",
+ UPLOAD_PORT = upload_disk
+ )
+ print 'upload disk: ' , upload_disk
+ else:
+ print '\nUnable to find destination disk. File must be copied manually. \n'
+
+
+ if current_OS == 'Darwin': # MAC
+
+ #
+ # platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
+ #
+
+ import os
+ upload_disk = 'Disk not found'
+ drives = os.listdir('/Volumes') # human readable names
+ target_file_found = False
+ target_drive_found = False
+ if target_drive in drives and target_file_found == False: # set upload if not found target file yet
+ target_drive_found = True
+ upload_disk = '/Volumes/' + target_drive + '/'
+ for drive in drives:
+ try:
+ filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
+ except:
+ continue
+ else:
+ if target_filename in filenames:
+ if target_file_found == False:
+ upload_disk = '/Volumes/' + drive + '/'
+ target_file_found = True
+ #
+ # set upload_port to drive if found
+ #
+
+ if target_file_found == True or target_drive_found == True:
+ Import("env")
+ env.Replace(
+ UPLOAD_PORT = upload_disk
+ )
+ print '\nupload disk: ' , upload_disk, '\n'
+ else:
+ print '\nUnable to find destination disk. File must be copied manually. \n'
diff --git a/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp b/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
index 0c7f31bed066..589e05ebd602 100644
--- a/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
@@ -50,6 +50,9 @@ void watchdog_reset() {
#endif
}
+#else
+ void HAL_clear_reset_source(void) {}
+ uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; }
#endif // USE_WATCHDOG
#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
new file mode 100644
index 000000000000..95dbb0a502dd
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
@@ -0,0 +1,279 @@
+/**
+ * Marlin 3D Printer Firmware
+ *
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
+ * Copyright (c) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
+ */
+
+#ifdef __STM32F1__
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "HAL.h"
+#include
+
+// --------------------------------------------------------------------------
+// Externals
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+#define __I
+#define __IO
+ typedef struct
+ {
+ __I uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */
+ __IO uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */
+ __IO uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */
+ __IO uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */
+ __IO uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */
+ __IO uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */
+ __IO uint8_t SHP[12]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */
+ __IO uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */
+ __IO uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */
+ __IO uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */
+ __IO uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */
+ __IO uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */
+ __IO uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */
+ __IO uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
+ __I uint32_t PFR[2]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
+ __I uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
+ __I uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
+ __I uint32_t MMFR[4]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
+ __I uint32_t ISAR[5]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
+ uint32_t RESERVED0[5];
+ __IO uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
+ } SCB_Type;
+
+// --------------------------------------------------------------------------
+// Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Local defines
+// --------------------------------------------------------------------------
+#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
+#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
+
+#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos 16 /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_PRIGROUP_Pos 8 /*!< SCB AIRCR: PRIGROUP Position */
+#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+USBSerial SerialUSB;
+
+uint16_t HAL_adc_result;
+
+// --------------------------------------------------------------------------
+// Private Variables
+// --------------------------------------------------------------------------
+STM32ADC adc(ADC1);
+
+uint8 adc_pins[] = {
+ #if HAS_TEMP_ADC_0
+ TEMP_0_PIN,
+ #endif
+ #if HAS_TEMP_ADC_1
+ TEMP_1_PIN
+ #endif
+ #if HAS_TEMP_ADC_2
+ TEMP_2_PIN,
+ #endif
+ #if HAS_TEMP_ADC_3
+ TEMP_3_PIN,
+ #endif
+ #if HAS_TEMP_ADC_4
+ TEMP_4_PIN,
+ #endif
+ #if HAS_HEATED_BED
+ TEMP_BED_PIN,
+ #endif
+ #if ENABLED(FILAMENT_WIDTH_SENSOR)
+ FILWIDTH_PIN,
+ #endif
+};
+
+enum TEMP_PINS : char {
+ #if HAS_TEMP_ADC_0
+ TEMP_0,
+ #endif
+ #if HAS_TEMP_ADC_1
+ TEMP_1,
+ #endif
+ #if HAS_TEMP_ADC_2
+ TEMP_2,
+ #endif
+ #if HAS_TEMP_ADC_3
+ TEMP_3,
+ #endif
+ #if HAS_TEMP_ADC_4
+ TEMP_4,
+ #endif
+ #if HAS_HEATED_BED
+ TEMP_BED,
+ #endif
+ #if ENABLED(FILAMENT_WIDTH_SENSOR)
+ FILWIDTH,
+ #endif
+ ADC_PIN_COUNT
+};
+
+uint16_t HAL_adc_results[ADC_PIN_COUNT];
+
+
+// --------------------------------------------------------------------------
+// Function prototypes
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private functions
+// --------------------------------------------------------------------------
+static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) {
+ uint32_t reg_value;
+ uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07); /* only values 0..7 are used */
+
+ reg_value = SCB->AIRCR; /* read old register configuration */
+ reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */
+ reg_value = (reg_value |
+ ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) |
+ (PriorityGroupTmp << 8)); /* Insert write key and priorty group */
+ SCB->AIRCR = reg_value;
+}
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+void HAL_init(void) {
+ NVIC_SetPriorityGrouping(0x3);
+}
+
+/* VGPV Done with defines
+// disable interrupts
+void cli(void) { noInterrupts(); }
+
+// enable interrupts
+void sei(void) { interrupts(); }
+*/
+
+void HAL_clear_reset_source(void) { }
+
+/**
+ * TODO: Check this and change or remove.
+ * currently returns 1 that's equal to poweron reset.
+ */
+uint8_t HAL_get_reset_source(void) { return 1; }
+
+void _delay_ms(const int delay_ms) { delay(delay_ms); }
+
+extern "C" {
+ extern unsigned int _ebss; // end of bss section
+}
+
+/**
+ * TODO: Change this to correct it for libmaple
+ */
+
+// return free memory between end of heap (or end bss) and whatever is current
+
+/*
+#include "wirish/syscalls.c"
+//extern caddr_t _sbrk(int incr);
+#ifndef CONFIG_HEAP_END
+extern char _lm_heap_end;
+#define CONFIG_HEAP_END ((caddr_t)&_lm_heap_end)
+#endif
+
+extern "C" {
+ static int freeMemory() {
+ char top = 't';
+ return &top - reinterpret_cast(sbrk(0));
+ }
+ int freeMemory() {
+ int free_memory;
+ int heap_end = (int)_sbrk(0);
+ free_memory = ((int)&free_memory) - ((int)heap_end);
+ return free_memory;
+ }
+}
+*/
+
+// --------------------------------------------------------------------------
+// ADC
+// --------------------------------------------------------------------------
+// Init the AD in continuous capture mode
+void HAL_adc_init(void) {
+ // configure the ADC
+ adc.calibrate();
+ adc.setSampleRate(ADC_SMPR_41_5); // ?
+ adc.setPins(adc_pins, ADC_PIN_COUNT);
+ adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), (void (*)())NULL);
+ adc.setScanMode();
+ adc.setContinuous();
+ adc.startConversion();
+}
+
+void HAL_adc_start_conversion(const uint8_t adc_pin) {
+ TEMP_PINS pin_index;
+ switch (adc_pin) {
+ #if HAS_TEMP_ADC_0
+ case TEMP_0_PIN: pin_index = TEMP_0; break;
+ #endif
+ #if HAS_TEMP_ADC_1
+ case TEMP_1_PIN: pin_index = TEMP_1; break;
+ #endif
+ #if HAS_TEMP_ADC_2
+ case TEMP_2_PIN: pin_index = TEMP_2; break;
+ #endif
+ #if HAS_TEMP_ADC_3
+ case TEMP_3_PIN: pin_index = TEMP_3; break;
+ #endif
+ #if HAS_TEMP_ADC_4
+ case TEMP_4_PIN: pin_index = TEMP_4; break;
+ #endif
+ #if HAS_HEATED_BED
+ case TEMP_BED_PIN: pin_index = TEMP_BED; break;
+ #endif
+ #if ENABLED(FILAMENT_WIDTH_SENSOR)
+ case FILWIDTH_PIN: pin_index = FILWIDTH; break;
+ #endif
+ }
+ HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only.
+}
+
+uint16_t HAL_adc_get_result(void) {
+ return HAL_adc_result;
+}
+
+#endif // __STM32F1__
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h
similarity index 92%
rename from Marlin/src/HAL/HAL_STM32F1/HAL_Stm32f1.h
rename to Marlin/src/HAL/HAL_STM32F1/HAL.h
index fdbb5a53c07a..8d459b1dbb6d 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h
@@ -28,6 +28,7 @@
#ifndef _HAL_STM32F1_H
#define _HAL_STM32F1_H
+#define CPU_32_BIT
#undef DEBUG_NONE
#ifndef vsnprintf_P
@@ -39,7 +40,7 @@
// --------------------------------------------------------------------------
#include
-
+#include
#include
// --------------------------------------------------------------------------
@@ -55,6 +56,9 @@
// Includes
// --------------------------------------------------------------------------
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
+
#include "fastio_Stm32f1.h"
#include "watchdog_Stm32f1.h"
@@ -104,6 +108,10 @@ extern USBSerial SerialUSB;
#define NUM_SERIAL 1
#endif
+// Use HAL_init() to set interrupt grouping.
+#define HAL_INIT
+void HAL_init();
+
/**
* TODO: review this to return 1 for pins that are not analog input
*/
@@ -111,8 +119,11 @@ extern USBSerial SerialUSB;
#define analogInputToDigitalPin(p) (p)
#endif
-#define CRITICAL_SECTION_START noInterrupts();
-#define CRITICAL_SECTION_END interrupts();
+#define CRITICAL_SECTION_START uint32_t primask = __get_primask(); (void)__iCliRetVal()
+#define CRITICAL_SECTION_END if (!primask) (void)__iSeiRetVal()
+#define ISRS_ENABLED() (!__get_primask())
+#define ENABLE_ISRS() ((void)__iSeiRetVal())
+#define DISABLE_ISRS() ((void)__iCliRetVal())
// On AVR this is in math.h?
#define square(x) ((x)*(x))
@@ -213,7 +224,8 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
void HAL_adc_init(void);
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
-#define HAL_READ_ADC HAL_adc_result
+#define HAL_READ_ADC() HAL_adc_result
+#define HAL_ADC_READY() true
void HAL_adc_start_conversion(const uint8_t adc_pin);
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp
index 2dea5131b849..fe293d50d41c 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp
@@ -39,9 +39,11 @@ int8_t libServo::attach(const int pin, const int min, const int max) {
}
void libServo::move(const int value) {
+ constexpr uint16_t servo_delay[] = SERVO_DELAY;
+ static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
if (this->attach(0) >= 0) {
this->write(value);
- delay(SERVO_DELAY);
+ safe_delay(servo_delay[this->servoIndex]);
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
this->detach();
#endif
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
index c035ba755e75..c27f7bd07659 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
@@ -24,6 +24,7 @@
#ifndef HAL_SERVO_STM32F1_H
#define HAL_SERVO_STM32F1_H
+// Path needed, otherwise HAL version is used
#include <../../libraries/Servo/src/Servo.h>
// Inherit and expand on the official library
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
index d0985eb23d8c..59835829a783 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
@@ -36,7 +36,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include "../HAL_SPI.h"
#include "pins_arduino.h"
#include "spi_pins.h"
@@ -54,6 +54,7 @@ static SPISettings spiConfig;
// --------------------------------------------------------------------------
#if ENABLED(SOFTWARE_SPI)
+
// --------------------------------------------------------------------------
// Software SPI
// --------------------------------------------------------------------------
@@ -95,14 +96,13 @@ void spiBegin() {
void spiInit(uint8_t spiRate) {
uint8_t clock;
switch (spiRate) {
- case SPI_FULL_SPEED: clock = SPI_CLOCK_DIV2 ; break;
- case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4 ; break;
- case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
- case SPI_EIGHTH_SPEED: clock = SPI_CLOCK_DIV16; break;
- case SPI_SPEED_5: clock = SPI_CLOCK_DIV32; break;
- case SPI_SPEED_6: clock = SPI_CLOCK_DIV64; break;
- default:
- clock = SPI_CLOCK_DIV2; // Default from the SPI library
+ case SPI_FULL_SPEED: clock = SPI_CLOCK_DIV2 ; break;
+ case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4 ; break;
+ case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
+ case SPI_EIGHTH_SPEED: clock = SPI_CLOCK_DIV16; break;
+ case SPI_SPEED_5: clock = SPI_CLOCK_DIV32; break;
+ case SPI_SPEED_6: clock = SPI_CLOCK_DIV64; break;
+ default: clock = SPI_CLOCK_DIV2; // Default from the SPI library
}
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
SPI.begin();
@@ -168,7 +168,6 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
/** Begin SPI transaction, set clock, bit order, data mode */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
spiConfig = SPISettings(spiClock, (BitOrder)bitOrder, dataMode);
-
SPI.beginTransaction(spiConfig);
}
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
index 21b703367192..5c9f5e893e7d 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
@@ -30,7 +30,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include "HAL_timers_Stm32f1.h"
@@ -109,7 +109,11 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
*/
break;
}
- nvic_irq_set_priority(irq_num, 0xF); // this is the lowest settable priority, but should still be over USB
+
+ /**
+ * Give the Stepper ISR a higher priority (lower number)
+ * so it automatically preempts the Temperature ISR.
+ */
switch (timer_num) {
case STEP_TIMER_NUM:
@@ -117,8 +121,9 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
timer_set_count(STEP_TIMER_DEV, 0);
timer_set_prescaler(STEP_TIMER_DEV, (uint16)(STEPPER_TIMER_PRESCALE - 1));
timer_set_reload(STEP_TIMER_DEV, 0xFFFF);
- timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, min(HAL_TIMER_TYPE_MAX, (HAL_STEPPER_TIMER_RATE / frequency)));
+ timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, MIN(HAL_TIMER_TYPE_MAX, (STEPPER_TIMER_RATE / frequency)));
timer_attach_interrupt(STEP_TIMER_DEV, STEP_TIMER_CHAN, stepTC_Handler);
+ nvic_irq_set_priority(irq_num, 1);
timer_generate_update(STEP_TIMER_DEV);
timer_resume(STEP_TIMER_DEV);
break;
@@ -127,8 +132,9 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
timer_set_count(TEMP_TIMER_DEV, 0);
timer_set_prescaler(TEMP_TIMER_DEV, (uint16)(TEMP_TIMER_PRESCALE - 1));
timer_set_reload(TEMP_TIMER_DEV, 0xFFFF);
- timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, min(HAL_TIMER_TYPE_MAX, ((F_CPU / TEMP_TIMER_PRESCALE) / frequency)));
+ timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, MIN(HAL_TIMER_TYPE_MAX, ((F_CPU / TEMP_TIMER_PRESCALE) / frequency)));
timer_attach_interrupt(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, tempTC_Handler);
+ nvic_irq_set_priority(irq_num, 2);
timer_generate_update(TEMP_TIMER_DEV);
timer_resume(TEMP_TIMER_DEV);
break;
@@ -166,48 +172,48 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
timer_dev* get_timer_dev(int number) {
switch (number) {
#if STM32_HAVE_TIMER(1)
- case 1: return &timer1;
+ case 1: return &timer1;
#endif
#if STM32_HAVE_TIMER(2)
- case 2: return &timer2;
+ case 2: return &timer2;
#endif
#if STM32_HAVE_TIMER(3)
- case 3: return &timer3;
+ case 3: return &timer3;
#endif
#if STM32_HAVE_TIMER(4)
- case 4: return &timer4;
+ case 4: return &timer4;
#endif
#if STM32_HAVE_TIMER(5)
- case 5: return &timer5;
+ case 5: return &timer5;
#endif
#if STM32_HAVE_TIMER(6)
- case 6: return &timer6;
+ case 6: return &timer6;
#endif
#if STM32_HAVE_TIMER(7)
- case 7: return &timer7;
+ case 7: return &timer7;
#endif
#if STM32_HAVE_TIMER(8)
- case 8: return &timer8;
+ case 8: return &timer8;
#endif
#if STM32_HAVE_TIMER(9)
- case 9: return &timer9;
+ case 9: return &timer9;
#endif
#if STM32_HAVE_TIMER(10)
- case 10: return &timer10;
+ case 10: return &timer10;
#endif
#if STM32_HAVE_TIMER(11)
- case 11: return &timer11;
+ case 11: return &timer11;
#endif
#if STM32_HAVE_TIMER(12)
- case 12: return &timer12;
+ case 12: return &timer12;
#endif
#if STM32_HAVE_TIMER(13)
- case 13: return &timer14;
+ case 13: return &timer14;
#endif
#if STM32_HAVE_TIMER(14)
- case 14: return &timer14;
+ case 14: return &timer14;
#endif
- }
+ }
}
#endif // __STM32F1__
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
index effd528695a9..132cf4d22fb2 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
@@ -47,37 +47,34 @@
typedef uint16_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFF
+#define HAL_TIMER_RATE (F_CPU) // frequency of timers peripherals
+
+#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
+#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
+
#if defined(MCU_STM32F103CB) || defined(MCU_STM32F103C8)
#define STEP_TIMER_NUM 4 // For C8/CB boards, use timer 4
#else
#define STEP_TIMER_NUM 5 // for other boards, five is fine.
#endif
-
-#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
-#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
-
-timer_dev* get_timer_dev(int number);
-
-#define TIMER_DEV(num) get_timer_dev(num)
-
-#define STEP_TIMER_DEV TIMER_DEV(STEP_TIMER_NUM)
-#define TEMP_TIMER_DEV TIMER_DEV(TEMP_TIMER_NUM)
-
-//STM32_HAVE_TIMER(n);
-
-#define HAL_TIMER_RATE (F_CPU) // frequency of timers peripherals
-#define STEPPER_TIMER_PRESCALE 18 // prescaler for setting stepper timer, 4Mhz
-#define HAL_STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
-#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
-
#define PULSE_TIMER_NUM STEP_TIMER_NUM
-#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
-#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+#define STEPPER_TIMER_PRESCALE 18 // prescaler for setting stepper timer, 4Mhz
+#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
+
+timer_dev* get_timer_dev(int number);
+#define TIMER_DEV(num) get_timer_dev(num)
+#define STEP_TIMER_DEV TIMER_DEV(STEP_TIMER_NUM)
+#define TEMP_TIMER_DEV TIMER_DEV(TEMP_TIMER_NUM)
#define ENABLE_STEPPER_DRIVER_INTERRUPT() timer_enable_irq(STEP_TIMER_DEV, STEP_TIMER_CHAN)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() timer_disable_irq(STEP_TIMER_DEV, STEP_TIMER_CHAN)
@@ -88,7 +85,6 @@ timer_dev* get_timer_dev(int number);
#define HAL_timer_get_count(timer_num) timer_get_count(TIMER_DEV(timer_num))
-#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr)DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
// TODO change this
@@ -131,7 +127,7 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
*/
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
- //compare = min(compare, HAL_TIMER_TYPE_MAX);
+ //compare = MIN(compare, HAL_TIMER_TYPE_MAX);
switch (timer_num) {
case STEP_TIMER_NUM:
timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, compare);
@@ -175,4 +171,6 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
}
}
+#define HAL_timer_isr_epilogue(TIMER_NUM)
+
#endif // _HAL_TIMERS_STM32F1_H
diff --git a/Marlin/src/HAL/HAL_STM32F1/SanityCheck_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
similarity index 95%
rename from Marlin/src/HAL/HAL_STM32F1/SanityCheck_Stm32f1.h
rename to Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
index 19127efdf920..40917f03fe43 100644
--- a/Marlin/src/HAL/HAL_STM32F1/SanityCheck_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
@@ -66,3 +66,7 @@
#endif
#endif
#endif // SPINDLE_LASER_ENABLE
+
+#if ENABLED(EMERGENCY_PARSER)
+ #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
+#endif
diff --git a/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
index df68cf08173d..27ef0a487c6f 100644
--- a/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
@@ -36,7 +36,7 @@
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
- * the stepper-ISR via endstops.update(), most of the time finding no change.
+ * the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
@@ -49,41 +49,37 @@
#ifndef _ENDSTOP_INTERRUPTS_H_
#define _ENDSTOP_INTERRUPTS_H_
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
+
void setup_endstop_interrupts(void) {
#if HAS_X_MAX
- SET_INPUT(X_MAX_PIN);
attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE); // assign it
#endif
#if HAS_X_MIN
- SET_INPUT(X_MIN_PIN);
attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Y_MAX
- SET_INPUT(Y_MAX_PIN);
attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Y_MIN
- SET_INPUT(Y_MIN_PIN);
attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z_MAX
- SET_INPUT(Z_MAX_PIN);
attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z_MIN
- SET_INPUT(Z_MIN_PIN);
attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z2_MAX
- SET_INPUT(Z2_MAX_PIN);
attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z2_MIN
- SET_INPUT(Z2_MIN_PIN);
attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z_MIN_PROBE_PIN
- SET_INPUT(Z_MIN_PROBE_PIN);
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
#endif
}
diff --git a/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
index 1ebf9e85571a..d6683e36eeef 100644
--- a/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
@@ -32,23 +32,24 @@
#include
#define READ(IO) (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
-#define WRITE(IO, v) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << (16 * !(bool)v))
+#define WRITE(IO,V) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << (16 * !(bool)V))
#define TOGGLE(IO) (PIN_MAP[IO].gpio_device->regs->ODR = PIN_MAP[IO].gpio_device->regs->ODR ^ (1U << PIN_MAP[IO].gpio_bit))
-#define WRITE_VAR(IO, v) WRITE(io, v)
+#define WRITE_VAR(IO,V) WRITE(IO,V)
-#define _GET_MODE(IO) (gpio_get_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit))
-#define _SET_MODE(IO,M) do{ gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M); } while (0)
+#define _GET_MODE(IO) gpio_get_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit)
+#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
#define _SET_OUTPUT(IO) _SET_MODE(IO, GPIO_OUTPUT_PP)
+#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
+
#define SET_INPUT(IO) _SET_MODE(IO, GPIO_INPUT_FLOATING)
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU)
-#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); WRITE(IO, LOW); }while(0)
+#define SET_OUTPUT(IO) OUT_WRITE(IO,LOW)
#define GET_INPUT(IO) (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
#define GET_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP)
#define GET_TIMER(IO) (PIN_MAP[IO].timer_device != NULL)
-#define OUT_WRITE(IO, v) { _SET_OUTPUT(IO); WRITE(IO, v); }
/**
* TODO: Write a macro to test if PIN is PWM or not.
*/
diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
index dff51229648d..15472368e44d 100644
--- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
@@ -42,17 +42,19 @@
namespace HAL {
namespace PersistentStore {
-// Store settings in the last two pages
-// Flash pages must be erased before writing, so keep track.
-bool firstWrite = false;
-uint32_t pageBase = EEPROM_START_ADDRESS;
+namespace {
+ // Store settings in the last two pages
+ // Flash pages must be erased before writing, so keep track.
+ bool firstWrite = false;
+ uint32_t pageBase = EEPROM_START_ADDRESS;
+}
bool access_start() {
firstWrite = true;
return true;
}
-bool access_finish(){
+bool access_finish() {
FLASH_Lock();
firstWrite = false;
return true;
@@ -64,9 +66,9 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
if (firstWrite) {
FLASH_Unlock();
status = FLASH_ErasePage(EEPROM_PAGE0_BASE);
- if (status != FLASH_COMPLETE) return false;
+ if (status != FLASH_COMPLETE) return true;
status = FLASH_ErasePage(EEPROM_PAGE1_BASE);
- if (status != FLASH_COMPLETE) return false;
+ if (status != FLASH_COMPLETE) return true;
firstWrite = false;
}
@@ -76,7 +78,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
uint16_t* wordBuffer = (uint16_t *)value;
while (wordsToWrite) {
status = FLASH_ProgramHalfWord(pageBase + pos + (i * 2), wordBuffer[i]);
- if (status != FLASH_COMPLETE) return false;
+ if (status != FLASH_COMPLETE) return true;
wordsToWrite--;
i++;
}
@@ -85,15 +87,15 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
if (size & 1) {
uint16_t temp = value[size - 1];
status = FLASH_ProgramHalfWord(pageBase + pos + i, temp);
- if (status != FLASH_COMPLETE) return false;
+ if (status != FLASH_COMPLETE) return true;
}
crc16(crc, value, size);
pos += ((size + 1) & ~1);
- return true;
+ return false;
}
-void read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
+bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
for (uint16_t i = 0; i < size; i++) {
byte* accessPoint = (byte*)(pageBase + pos + i);
uint8_t c = *accessPoint;
@@ -101,6 +103,7 @@ void read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
crc16(crc, &c, 1);
}
pos += ((size + 1) & ~1);
+ return false;
}
} // PersistentStore
diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp
index bff46100855c..a64eab076fb1 100644
--- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp
@@ -44,37 +44,35 @@
namespace HAL {
namespace PersistentStore {
-#define CONFIG_FILE_NAME "eeprom.dat"
#define HAL_STM32F1_EEPROM_SIZE 4096
char HAL_STM32F1_eeprom_content[HAL_STM32F1_EEPROM_SIZE];
+char eeprom_filename[] = "eeprom.dat";
+
bool access_start() {
if (!card.cardOK) return false;
int16_t bytes_read = 0;
- const char eeprom_zero = 0xFF;
- card.openFile((char *)CONFIG_FILE_NAME,true);
- bytes_read = card.read (HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE);
- if (bytes_read == -1) return false;
- for (; bytes_read < HAL_STM32F1_EEPROM_SIZE; bytes_read++) {
+ constexpr char eeprom_zero = 0xFF;
+ card.openFile(eeprom_filename, true);
+ bytes_read = card.read(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE);
+ if (bytes_read < 0) return false;
+ for (; bytes_read < HAL_STM32F1_EEPROM_SIZE; bytes_read++)
HAL_STM32F1_eeprom_content[bytes_read] = eeprom_zero;
- }
card.closefile();
return true;
}
-bool access_finish(){
+bool access_finish() {
if (!card.cardOK) return false;
- int16_t bytes_written = 0;
- card.openFile((char *)CONFIG_FILE_NAME,true);
- bytes_written = card.write (HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE);
+ card.openFile(eeprom_filename, true);
+ int16_t bytes_written = card.write(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE);
card.closefile();
return (bytes_written == HAL_STM32F1_EEPROM_SIZE);
}
bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
- for (int i = 0; i < size; i++) {
- HAL_STM32F1_eeprom_content [pos + i] = value[i];
- }
+ for (int i = 0; i < size; i++)
+ HAL_STM32F1_eeprom_content[pos + i] = value[i];
crc16(crc, value, size);
pos += size;
return false;
diff --git a/Marlin/src/HAL/HAL_STM32F1/pinsDebug.h b/Marlin/src/HAL/HAL_STM32F1/pinsDebug.h
new file mode 100644
index 000000000000..e5022f79a482
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F1/pinsDebug.h
@@ -0,0 +1 @@
+#error Debug pins is not supported on this Platform!
diff --git a/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp b/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp
new file mode 100644
index 000000000000..26ab2fc92c22
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp
@@ -0,0 +1,571 @@
+/**
+ ******************************************************************************
+ * @file EEPROM/EEPROM_Emulation/src/eeprom.c
+ * @author MCD Application Team
+ * @version V1.2.6
+ * @date 04-November-2016
+ * @brief This file provides all the EEPROM emulation firmware functions.
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright © 2016 STMicroelectronics International N.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions are met:
+ *
+ * 1. Redistribution of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of STMicroelectronics nor the names of other
+ * contributors to this software may be used to endorse or promote products
+ * derived from this software without specific written permission.
+ * 4. This software, including modifications and/or derivative works of this
+ * software, must execute solely and exclusively on microcontroller or
+ * microprocessor devices manufactured by or for STMicroelectronics.
+ * 5. Redistribution and use of this software other than as permitted under
+ * this license is void and will automatically terminate your rights under
+ * this license.
+ *
+ * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
+ * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
+ * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ ******************************************************************************
+ */
+/** @addtogroup EEPROM_Emulation
+ * @{
+ */
+#if defined(STM32F4) || defined(STM32F4xx)
+
+/* Includes ------------------------------------------------------------------*/
+#include "eeprom_emul.h"
+
+/* Private typedef -----------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+/* Private macro -------------------------------------------------------------*/
+/* Private variables ---------------------------------------------------------*/
+
+/* Global variable used to store variable value in read sequence */
+uint16_t DataVar = 0;
+
+/* Virtual address defined by the user: 0xFFFF value is prohibited */
+uint16_t VirtAddVarTab[NB_OF_VAR];
+
+/* Private function prototypes -----------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+static HAL_StatusTypeDef EE_Format(void);
+static uint16_t EE_FindValidPage(uint8_t Operation);
+static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uint16_t Data);
+static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data);
+static uint16_t EE_VerifyPageFullyErased(uint32_t Address);
+
+/**
+ * @brief Restore the pages to a known good state in case of page's status
+ * corruption after a power loss.
+ * @param None.
+ * @retval - Flash error code: on write Flash error
+ * - FLASH_COMPLETE: on success
+ */
+uint16_t EE_Initialise(void) {
+ uint16_t PageStatus0 = 6, PageStatus1 = 6;
+ uint16_t VarIdx = 0;
+ uint16_t EepromStatus = 0, ReadStatus = 0;
+ int16_t x = -1;
+ HAL_StatusTypeDef FlashStatus;
+ uint32_t SectorError = 0;
+ FLASH_EraseInitTypeDef pEraseInit;
+
+
+ /* Get Page0 status */
+ PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS);
+ /* Get Page1 status */
+ PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS);
+
+ pEraseInit.TypeErase = TYPEERASE_SECTORS;
+ pEraseInit.Sector = PAGE0_ID;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+
+ /* Check for invalid header states and repair if necessary */
+ switch (PageStatus0) {
+ case ERASED:
+ if (PageStatus1 == VALID_PAGE) { /* Page0 erased, Page1 valid */
+ /* Erase Page0 */
+ if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) {
+ return FlashStatus;
+ }
+ }
+ }
+ else if (PageStatus1 == RECEIVE_DATA) { /* Page0 erased, Page1 receive */
+ /* Erase Page0 */
+ if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ /* Mark Page1 as valid */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE1_BASE_ADDRESS, VALID_PAGE);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ else { /* First EEPROM access (Page0&1 are erased) or invalid state -> format EEPROM */
+ /* Erase both Page0 and Page1 and set Page0 as valid page */
+ FlashStatus = EE_Format();
+ /* If erase/program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ break;
+
+ case RECEIVE_DATA:
+ if (PageStatus1 == VALID_PAGE) { /* Page0 receive, Page1 valid */
+ /* Transfer data from Page1 to Page0 */
+ for (VarIdx = 0; VarIdx < NB_OF_VAR; VarIdx++) {
+ if (( *(__IO uint16_t*)(PAGE0_BASE_ADDRESS + 6)) == VirtAddVarTab[VarIdx])
+ x = VarIdx;
+ if (VarIdx != x) {
+ /* Read the last variables' updates */
+ ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
+ /* In case variable corresponding to the virtual address was found */
+ if (ReadStatus != 0x1) {
+ /* Transfer the variable to the Page0 */
+ EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
+ /* If program operation was failed, a Flash error code is returned */
+ if (EepromStatus != HAL_OK) return EepromStatus;
+ }
+ }
+ }
+ /* Mark Page0 as valid */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE0_BASE_ADDRESS, VALID_PAGE);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ pEraseInit.Sector = PAGE1_ID;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+ /* Erase Page1 */
+ if (!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ }
+ else if (PageStatus1 == ERASED) { /* Page0 receive, Page1 erased */
+ pEraseInit.Sector = PAGE1_ID;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+ /* Erase Page1 */
+ if (!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ /* Mark Page0 as valid */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE0_BASE_ADDRESS, VALID_PAGE);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ else { /* Invalid state -> format eeprom */
+ /* Erase both Page0 and Page1 and set Page0 as valid page */
+ FlashStatus = EE_Format();
+ /* If erase/program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ break;
+
+ case VALID_PAGE:
+ if (PageStatus1 == VALID_PAGE) { /* Invalid state -> format eeprom */
+ /* Erase both Page0 and Page1 and set Page0 as valid page */
+ FlashStatus = EE_Format();
+ /* If erase/program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ else if (PageStatus1 == ERASED) { /* Page0 valid, Page1 erased */
+ pEraseInit.Sector = PAGE1_ID;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+ /* Erase Page1 */
+ if (!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ }
+ else { /* Page0 valid, Page1 receive */
+ /* Transfer data from Page0 to Page1 */
+ for (VarIdx = 0; VarIdx < NB_OF_VAR; VarIdx++) {
+ if ((*(__IO uint16_t*)(PAGE1_BASE_ADDRESS + 6)) == VirtAddVarTab[VarIdx])
+ x = VarIdx;
+
+ if (VarIdx != x) {
+ /* Read the last variables' updates */
+ ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
+ /* In case variable corresponding to the virtual address was found */
+ if (ReadStatus != 0x1) {
+ /* Transfer the variable to the Page1 */
+ EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
+ /* If program operation was failed, a Flash error code is returned */
+ if (EepromStatus != HAL_OK) return EepromStatus;
+ }
+ }
+ }
+ /* Mark Page1 as valid */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE1_BASE_ADDRESS, VALID_PAGE);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ pEraseInit.Sector = PAGE0_ID;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+ /* Erase Page0 */
+ if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ }
+ break;
+
+ default: /* Any other state -> format eeprom */
+ /* Erase both Page0 and Page1 and set Page0 as valid page */
+ FlashStatus = EE_Format();
+ /* If erase/program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ break;
+ }
+
+ return HAL_OK;
+}
+
+/**
+ * @brief Verify if specified page is fully erased.
+ * @param Address: page address
+ * This parameter can be one of the following values:
+ * @arg PAGE0_BASE_ADDRESS: Page0 base address
+ * @arg PAGE1_BASE_ADDRESS: Page1 base address
+ * @retval page fully erased status:
+ * - 0: if Page not erased
+ * - 1: if Page erased
+ */
+uint16_t EE_VerifyPageFullyErased(uint32_t Address) {
+ uint32_t ReadStatus = 1;
+ uint16_t AddressValue = 0x5555;
+ /* Check each active page address starting from end */
+ while (Address <= PAGE0_END_ADDRESS) {
+ /* Get the current location content to be compared with virtual address */
+ AddressValue = (*(__IO uint16_t*)Address);
+ /* Compare the read address with the virtual address */
+ if (AddressValue != ERASED) {
+ /* In case variable value is read, reset ReadStatus flag */
+ ReadStatus = 0;
+ break;
+ }
+ /* Next address location */
+ Address += 4;
+ }
+ /* Return ReadStatus value: (0: Page not erased, 1: Sector erased) */
+ return ReadStatus;
+}
+
+/**
+ * @brief Returns the last stored variable data, if found, which correspond to
+ * the passed virtual address
+ * @param VirtAddress: Variable virtual address
+ * @param Data: Global variable contains the read variable value
+ * @retval Success or error status:
+ * - 0: if variable was found
+ * - 1: if the variable was not found
+ * - NO_VALID_PAGE: if no valid page was found.
+ */
+uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data) {
+ uint16_t ValidPage = PAGE0;
+ uint16_t AddressValue = 0x5555, ReadStatus = 1;
+ uint32_t Address = EEPROM_START_ADDRESS, PageStartAddress = EEPROM_START_ADDRESS;
+
+ /* Get active Page for read operation */
+ ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);
+
+ /* Check if there is no valid page */
+ if (ValidPage == NO_VALID_PAGE) return NO_VALID_PAGE;
+
+ /* Get the valid Page start Address */
+ PageStartAddress = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE));
+
+ /* Get the valid Page end Address */
+ Address = (uint32_t)((EEPROM_START_ADDRESS - 2) + (uint32_t)((1 + ValidPage) * PAGE_SIZE));
+
+ /* Check each active page address starting from end */
+ while (Address > (PageStartAddress + 2)) {
+ /* Get the current location content to be compared with virtual address */
+ AddressValue = (*(__IO uint16_t*)Address);
+
+ /* Compare the read address with the virtual address */
+ if (AddressValue == VirtAddress) {
+ /* Get content of Address-2 which is variable value */
+ *Data = (*(__IO uint16_t*)(Address - 2));
+ /* In case variable value is read, reset ReadStatus flag */
+ ReadStatus = 0;
+ break;
+ }
+ else /* Next address location */
+ Address -= 4;
+ }
+ /* Return ReadStatus value: (0: variable exist, 1: variable doesn't exist) */
+ return ReadStatus;
+}
+
+/**
+ * @brief Writes/upadtes variable data in EEPROM.
+ * @param VirtAddress: Variable virtual address
+ * @param Data: 16 bit data to be written
+ * @retval Success or error status:
+ * - FLASH_COMPLETE: on success
+ * - PAGE_FULL: if valid page is full
+ * - NO_VALID_PAGE: if no valid page was found
+ * - Flash error code: on write Flash error
+ */
+uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data) {
+ /* Write the variable virtual address and value in the EEPROM */
+ uint16_t Status = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
+
+ /* In case the EEPROM active page is full */
+ if (Status == PAGE_FULL) /* Perform Page transfer */
+ Status = EE_PageTransfer(VirtAddress, Data);
+
+ /* Return last operation status */
+ return Status;
+}
+
+/**
+ * @brief Erases PAGE and PAGE1 and writes VALID_PAGE header to PAGE
+ * @param None
+ * @retval Status of the last operation (Flash write or erase) done during
+ * EEPROM formating
+ */
+static HAL_StatusTypeDef EE_Format(void) {
+ HAL_StatusTypeDef FlashStatus = HAL_OK;
+ uint32_t SectorError = 0;
+ FLASH_EraseInitTypeDef pEraseInit;
+
+ pEraseInit.TypeErase = FLASH_TYPEERASE_SECTORS;
+ pEraseInit.Sector = PAGE0_ID;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+ /* Erase Page0 */
+ if (!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+ /* Set Page0 as valid page: Write VALID_PAGE at Page0 base address */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, PAGE0_BASE_ADDRESS, VALID_PAGE);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+
+ pEraseInit.Sector = PAGE1_ID;
+ /* Erase Page1 */
+ if (!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS)) {
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ }
+
+ return HAL_OK;
+}
+
+/**
+ * @brief Find valid Page for write or read operation
+ * @param Operation: operation to achieve on the valid page.
+ * This parameter can be one of the following values:
+ * @arg READ_FROM_VALID_PAGE: read operation from valid page
+ * @arg WRITE_IN_VALID_PAGE: write operation from valid page
+ * @retval Valid page number (PAGE or PAGE1) or NO_VALID_PAGE in case
+ * of no valid page was found
+ */
+static uint16_t EE_FindValidPage(uint8_t Operation) {
+ uint16_t PageStatus0 = 6, PageStatus1 = 6;
+
+ /* Get Page0 actual status */
+ PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS);
+
+ /* Get Page1 actual status */
+ PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS);
+
+ /* Write or read operation */
+ switch (Operation) {
+ case WRITE_IN_VALID_PAGE: /* ---- Write operation ---- */
+ if (PageStatus1 == VALID_PAGE) {
+ /* Page0 receiving data */
+ if (PageStatus0 == RECEIVE_DATA) return PAGE0; /* Page0 valid */
+ else return PAGE1; /* Page1 valid */
+ }
+ else if (PageStatus0 == VALID_PAGE) {
+ /* Page1 receiving data */
+ if (PageStatus1 == RECEIVE_DATA) return PAGE1; /* Page1 valid */
+ else return PAGE0; /* Page0 valid */
+ }
+ else
+ return NO_VALID_PAGE; /* No valid Page */
+
+ case READ_FROM_VALID_PAGE: /* ---- Read operation ---- */
+ if (PageStatus0 == VALID_PAGE)
+ return PAGE0; /* Page0 valid */
+ else if (PageStatus1 == VALID_PAGE)
+ return PAGE1; /* Page1 valid */
+ else
+ return NO_VALID_PAGE; /* No valid Page */
+
+ default:
+ return PAGE0; /* Page0 valid */
+ }
+}
+
+/**
+ * @brief Verify if active page is full and Writes variable in EEPROM.
+ * @param VirtAddress: 16 bit virtual address of the variable
+ * @param Data: 16 bit data to be written as variable value
+ * @retval Success or error status:
+ * - FLASH_COMPLETE: on success
+ * - PAGE_FULL: if valid page is full
+ * - NO_VALID_PAGE: if no valid page was found
+ * - Flash error code: on write Flash error
+ */
+static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uint16_t Data) {
+ HAL_StatusTypeDef FlashStatus = HAL_OK;
+ uint16_t ValidPage = PAGE0;
+ uint32_t Address = EEPROM_START_ADDRESS, PageEndAddress = EEPROM_START_ADDRESS+PAGE_SIZE;
+
+ /* Get valid Page for write operation */
+ ValidPage = EE_FindValidPage(WRITE_IN_VALID_PAGE);
+
+ /* Check if there is no valid page */
+ if (ValidPage == NO_VALID_PAGE) return NO_VALID_PAGE;
+
+ /* Get the valid Page start Address */
+ Address = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE));
+
+ /* Get the valid Page end Address */
+ PageEndAddress = (uint32_t)((EEPROM_START_ADDRESS - 1) + (uint32_t)((ValidPage + 1) * PAGE_SIZE));
+
+ /* Check each active page address starting from begining */
+ while (Address < PageEndAddress) {
+ /* Verify if Address and Address+2 contents are 0xFFFFFFFF */
+ if ((*(__IO uint32_t*)Address) == 0xFFFFFFFF) {
+ /* Set variable data */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, Address, Data);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+ /* Set variable virtual address */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, Address + 2, VirtAddress);
+ /* Return program operation status */
+ return FlashStatus;
+ }
+ else /* Next address location */
+ Address += 4;
+ }
+
+ /* Return PAGE_FULL in case the valid page is full */
+ return PAGE_FULL;
+}
+
+/**
+ * @brief Transfers last updated variables data from the full Page to
+ * an empty one.
+ * @param VirtAddress: 16 bit virtual address of the variable
+ * @param Data: 16 bit data to be written as variable value
+ * @retval Success or error status:
+ * - FLASH_COMPLETE: on success
+ * - PAGE_FULL: if valid page is full
+ * - NO_VALID_PAGE: if no valid page was found
+ * - Flash error code: on write Flash error
+ */
+static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data) {
+ HAL_StatusTypeDef FlashStatus = HAL_OK;
+ uint32_t NewPageAddress = EEPROM_START_ADDRESS;
+ uint16_t OldPageId=0;
+ uint16_t ValidPage = PAGE0, VarIdx = 0;
+ uint16_t EepromStatus = 0, ReadStatus = 0;
+ uint32_t SectorError = 0;
+ FLASH_EraseInitTypeDef pEraseInit;
+
+ /* Get active Page for read operation */
+ ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);
+
+ if (ValidPage == PAGE1) { /* Page1 valid */
+ /* New page address where variable will be moved to */
+ NewPageAddress = PAGE0_BASE_ADDRESS;
+ /* Old page ID where variable will be taken from */
+ OldPageId = PAGE1_ID;
+ }
+ else if (ValidPage == PAGE0) { /* Page0 valid */
+ /* New page address where variable will be moved to */
+ NewPageAddress = PAGE1_BASE_ADDRESS;
+ /* Old page ID where variable will be taken from */
+ OldPageId = PAGE0_ID;
+ }
+ else
+ return NO_VALID_PAGE; /* No valid Page */
+
+ /* Set the new Page status to RECEIVE_DATA status */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, NewPageAddress, RECEIVE_DATA);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+
+ /* Write the variable passed as parameter in the new active page */
+ EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
+ /* If program operation was failed, a Flash error code is returned */
+ if (EepromStatus != HAL_OK) return EepromStatus;
+
+ /* Transfer process: transfer variables from old to the new active page */
+ for (VarIdx = 0; VarIdx < NB_OF_VAR; VarIdx++) {
+ if (VirtAddVarTab[VarIdx] != VirtAddress) { /* Check each variable except the one passed as parameter */
+ /* Read the other last variable updates */
+ ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
+ /* In case variable corresponding to the virtual address was found */
+ if (ReadStatus != 0x1) {
+ /* Transfer the variable to the new active page */
+ EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
+ /* If program operation was failed, a Flash error code is returned */
+ if (EepromStatus != HAL_OK) return EepromStatus;
+ }
+ }
+ }
+
+ pEraseInit.TypeErase = TYPEERASE_SECTORS;
+ pEraseInit.Sector = OldPageId;
+ pEraseInit.NbSectors = 1;
+ pEraseInit.VoltageRange = VOLTAGE_RANGE;
+
+ /* Erase the old Page: Set old Page status to ERASED status */
+ FlashStatus = HAL_FLASHEx_Erase(&pEraseInit, &SectorError);
+ /* If erase operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+
+ /* Set new Page status to VALID_PAGE status */
+ FlashStatus = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, NewPageAddress, VALID_PAGE);
+ /* If program operation was failed, a Flash error code is returned */
+ if (FlashStatus != HAL_OK) return FlashStatus;
+
+ /* Return last operation flash status */
+ return FlashStatus;
+}
+
+#endif // STM32F4 || STM32F4xx
+
+/**
+ * @}
+ */
+
+/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
diff --git a/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h b/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h
new file mode 100644
index 000000000000..476baee92fb7
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h
@@ -0,0 +1,117 @@
+/**
+ ******************************************************************************
+ * @file EEPROM/EEPROM_Emulation/inc/eeprom.h
+ * @author MCD Application Team
+ * @version V1.2.6
+ * @date 04-November-2016
+ * @brief This file contains all the functions prototypes for the EEPROM
+ * emulation firmware library.
+ ******************************************************************************
+ * @attention
+ *
+ * © Copyright � 2016 STMicroelectronics International N.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions are met:
+ *
+ * 1. Redistribution of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of STMicroelectronics nor the names of other
+ * contributors to this software may be used to endorse or promote products
+ * derived from this software without specific written permission.
+ * 4. This software, including modifications and/or derivative works of this
+ * software, must execute solely and exclusively on microcontroller or
+ * microprocessor devices manufactured by or for STMicroelectronics.
+ * 5. Redistribution and use of this software other than as permitted under
+ * this license is void and will automatically terminate your rights under
+ * this license.
+ *
+ * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
+ * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
+ * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ ******************************************************************************
+ */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __EEEPROM_EMUL_H
+#define __EEEPROM_EMUL_H
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+#include "../../../inc/MarlinConfig.h"
+#include "../HAL.h"
+
+/* Exported constants --------------------------------------------------------*/
+/* EEPROM emulation firmware error codes */
+#define EE_OK (uint32_t)HAL_OK
+#define EE_ERROR (uint32_t)HAL_ERROR
+#define EE_BUSY (uint32_t)HAL_BUSY
+#define EE_TIMEOUT (uint32_t)HAL_TIMEOUT
+
+/* Define the size of the sectors to be used */
+#define PAGE_SIZE (uint32_t)0x4000 /* Page size = 16KByte */
+
+/* Device voltage range supposed to be [2.7V to 3.6V], the operation will
+ be done by word */
+#define VOLTAGE_RANGE (uint8_t)VOLTAGE_RANGE_3
+
+/* EEPROM start address in Flash */
+#define EEPROM_START_ADDRESS ((uint32_t)0x08078000) /* EEPROM emulation start address:
+ after 480KByte of used Flash memory */
+
+/* Pages 0 and 1 base and end addresses */
+#define PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x0000))
+#define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1)))
+#define PAGE0_ID FLASH_SECTOR_1
+
+#define PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x4000))
+#define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1)))
+#define PAGE1_ID FLASH_SECTOR_2
+
+/* Used Flash pages for EEPROM emulation */
+#define PAGE0 ((uint16_t)0x0000)
+#define PAGE1 ((uint16_t)0x0001) /* Page nb between PAGE0_BASE_ADDRESS & PAGE1_BASE_ADDRESS*/
+
+/* No valid page define */
+#define NO_VALID_PAGE ((uint16_t)0x00AB)
+
+/* Page status definitions */
+#define ERASED ((uint16_t)0xFFFF) /* Page is empty */
+#define RECEIVE_DATA ((uint16_t)0xEEEE) /* Page is marked to receive data */
+#define VALID_PAGE ((uint16_t)0x0000) /* Page containing valid data */
+
+/* Valid pages in read and write defines */
+#define READ_FROM_VALID_PAGE ((uint8_t)0x00)
+#define WRITE_IN_VALID_PAGE ((uint8_t)0x01)
+
+/* Page full define */
+#define PAGE_FULL ((uint8_t)0x80)
+
+/* Variables' number */
+#define NB_OF_VAR ((uint16_t)4096)
+
+/* Exported types ------------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+uint16_t EE_Initialise(void);
+uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
+uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
+
+#endif /* __EEEPROM_H */
+
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp b/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
new file mode 100644
index 000000000000..b76de3dbe81e
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
@@ -0,0 +1,143 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#if defined(STM32F4) || defined(STM32F4xx)
+
+/**
+ * Description: functions for I2C connected external EEPROM.
+ * Not platform dependent.
+ */
+
+#include "../../inc/MarlinConfig.h"
+
+#if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "HAL.h"
+#include "EEPROM_Emul/eeprom_emul.h"
+
+
+// --------------------------------------------------------------------------
+// Externals
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Local defines
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private Variables
+// --------------------------------------------------------------------------
+static bool eeprom_initialised = false;
+// --------------------------------------------------------------------------
+// Function prototypes
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private functions
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+// FLASH_FLAG_PGSERR (Programming Sequence Error) was renamed to
+// FLASH_FLAG_ERSERR (Erasing Sequence Error) in STM32F4
+// #define FLASH_FLAG_PGSERR FLASH_FLAG_ERSERR
+
+// --------------------------------------------------------------------------
+// EEPROM
+// --------------------------------------------------------------------------
+
+
+void eeprom_init() {
+ if (!eeprom_initialised) {
+ HAL_FLASH_Unlock();
+
+ __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
+
+ /* EEPROM Init */
+ if (EE_Initialise() != EE_OK)
+ for (;;) HAL_Delay(1); // Spin forever until watchdog reset
+
+ HAL_FLASH_Lock();
+ eeprom_initialised = true;
+ }
+}
+
+void eeprom_write_byte(unsigned char *pos, unsigned char value) {
+ uint16_t eeprom_address = (unsigned) pos;
+
+ eeprom_init();
+
+ HAL_FLASH_Unlock();
+ __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
+
+ if (EE_WriteVariable(eeprom_address, (uint16_t) value) != EE_OK)
+ for (;;) HAL_Delay(1); // Spin forever until watchdog reset
+
+ HAL_FLASH_Lock();
+}
+
+unsigned char eeprom_read_byte(unsigned char *pos) {
+ uint16_t data = 0xFF;
+ uint16_t eeprom_address = (unsigned)pos;
+
+ eeprom_init();
+
+ if (EE_ReadVariable(eeprom_address, &data) != EE_OK) {
+ return (unsigned char)data;
+ }
+ return (unsigned char)data;
+}
+
+void eeprom_read_block(void *__dst, const void *__src, size_t __n) {
+ uint16_t data = 0xFF;
+ uint16_t eeprom_address = (unsigned) __src;
+
+ eeprom_init();
+
+ for (uint8_t c = 0; c < __n; c++) {
+ EE_ReadVariable(eeprom_address+c, &data);
+ *((uint8_t*)__dst + c) = data;
+ }
+}
+
+void eeprom_update_block(const void *__src, void *__dst, size_t __n) {
+
+}
+
+#endif // ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
+#endif // STM32F4 || STM32F4xx
+
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
similarity index 62%
rename from Marlin/src/HAL/HAL_STM32F1/HAL_Stm32f1.cpp
rename to Marlin/src/HAL/HAL_STM32F4/HAL.cpp
index d47b960ab57b..c79af5859a0c 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
@@ -21,18 +21,13 @@
*
*/
-/**
- * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
- */
-
-#ifdef __STM32F1__
+#if defined(STM32F4) || defined(STM32F4xx)
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
-#include
+#include "HAL.h"
//#include
@@ -55,66 +50,12 @@
// --------------------------------------------------------------------------
// Public Variables
// --------------------------------------------------------------------------
-USBSerial SerialUSB;
uint16_t HAL_adc_result;
// --------------------------------------------------------------------------
// Private Variables
// --------------------------------------------------------------------------
-STM32ADC adc(ADC1);
-
-uint8 adc_pins[] = {
- #if HAS_TEMP_0
- TEMP_0_PIN,
- #endif
- #if HAS_TEMP_1
- TEMP_1_PIN
- #endif
- #if HAS_TEMP_2
- TEMP_2_PIN,
- #endif
- #if HAS_TEMP_3
- TEMP_3_PIN,
- #endif
- #if HAS_TEMP_4
- TEMP_4_PIN,
- #endif
- #if HAS_TEMP_BED
- TEMP_BED_PIN,
- #endif
- #if ENABLED(FILAMENT_WIDTH_SENSOR)
- FILWIDTH_PIN,
- #endif
-};
-
-enum TEMP_PINS : char {
- #if HAS_TEMP_0
- TEMP_0,
- #endif
- #if HAS_TEMP_1
- TEMP_1,
- #endif
- #if HAS_TEMP_2
- TEMP_2,
- #endif
- #if HAS_TEMP_3
- TEMP_3,
- #endif
- #if HAS_TEMP_4
- TEMP_4,
- #endif
- #if HAS_TEMP_BED
- TEMP_BED,
- #endif
- #if ENABLED(FILAMENT_WIDTH_SENSOR)
- FILWIDTH,
- #endif
- ADC_PIN_COUNT
-};
-
-uint16_t HAL_adc_results[ADC_PIN_COUNT];
-
// --------------------------------------------------------------------------
// Function prototypes
@@ -136,13 +77,16 @@ void cli(void) { noInterrupts(); }
void sei(void) { interrupts(); }
*/
-void HAL_clear_reset_source(void) { }
+void HAL_clear_reset_source(void) { __HAL_RCC_CLEAR_RESET_FLAGS(); }
-/**
- * TODO: Check this and change or remove.
- * currently returns 1 that's equal to poweron reset.
- */
-uint8_t HAL_get_reset_source(void) { return 1; }
+uint8_t HAL_get_reset_source (void) {
+ if (__HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST) != RESET) return RST_WATCHDOG;
+
+ if (__HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST) != RESET) return RST_SOFTWARE;
+ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PINRST) != RESET) return RST_EXTERNAL;
+ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PORRST) != RESET) return RST_POWER_ON;
+ return 0;
+}
void _delay_ms(const int delay_ms) { delay(delay_ms); }
@@ -150,10 +94,6 @@ extern "C" {
extern unsigned int _ebss; // end of bss section
}
-/**
- * TODO: Change this to correct it for libmaple
- */
-
// return free memory between end of heap (or end bss) and whatever is current
/*
@@ -181,48 +121,13 @@ extern "C" {
// --------------------------------------------------------------------------
// ADC
// --------------------------------------------------------------------------
-// Init the AD in continuous capture mode
-void HAL_adc_init(void) {
- // configure the ADC
- adc.calibrate();
- adc.setSampleRate(ADC_SMPR_41_5); // ?
- adc.setPins(adc_pins, ADC_PIN_COUNT);
- adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), (void (*)())NULL);
- adc.setScanMode();
- adc.setContinuous();
- adc.startConversion();
-}
void HAL_adc_start_conversion(const uint8_t adc_pin) {
- TEMP_PINS pin_index;
- switch (adc_pin) {
- #if HAS_TEMP_0
- case TEMP_0_PIN: pin_index = TEMP_0; break;
- #endif
- #if HAS_TEMP_1
- case TEMP_1_PIN: pin_index = TEMP_1; break;
- #endif
- #if HAS_TEMP_2
- case TEMP_2_PIN: pin_index = TEMP_2; break;
- #endif
- #if HAS_TEMP_3
- case TEMP_3_PIN: pin_index = TEMP_3; break;
- #endif
- #if HAS_TEMP_4
- case TEMP_4_PIN: pin_index = TEMP_4; break;
- #endif
- #if HAS_TEMP_BED
- case TEMP_BED_PIN: pin_index = TEMP_BED; break;
- #endif
- #if ENABLED(FILAMENT_WIDTH_SENSOR)
- case FILWIDTH_PIN: pin_index = FILWIDTH; break;
- #endif
- }
- HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only.
+ HAL_adc_result = analogRead(adc_pin);
}
uint16_t HAL_adc_get_result(void) {
return HAL_adc_result;
}
-#endif // __STM32F1__
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.h b/Marlin/src/HAL/HAL_STM32F4/HAL.h
new file mode 100644
index 000000000000..b5beefbfe191
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL.h
@@ -0,0 +1,256 @@
+/**
+ * Marlin 3D Printer Firmware
+ *
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
+ * Copyright (c) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef _HAL_STM32F4_H
+#define _HAL_STM32F4_H
+
+#define CPU_32_BIT
+#undef DEBUG_NONE
+
+#ifndef vsnprintf_P
+ #define vsnprintf_P vsnprintf
+#endif
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include
+
+#include "Arduino.h"
+
+#ifdef USBCON
+ #include
+#endif
+
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
+#include "fastio_STM32F4.h"
+#include "watchdog_STM32F4.h"
+
+#include "HAL_timers_STM32F4.h"
+
+// --------------------------------------------------------------------------
+// Defines
+// --------------------------------------------------------------------------
+
+//Serial override
+//extern HalSerial usb_serial;
+
+#if SERIAL_PORT == 0
+ #error "Serial port 0 does not exist"
+#endif
+
+#if !WITHIN(SERIAL_PORT, -1, 6)
+ #error "SERIAL_PORT must be from -1 to 6"
+#endif
+#if SERIAL_PORT == -1
+ #define MYSERIAL0 SerialUSB
+#elif SERIAL_PORT == 1
+ #define MYSERIAL0 SerialUART1
+#elif SERIAL_PORT == 2
+ #define MYSERIAL0 SerialUART2
+#elif SERIAL_PORT == 3
+ #define MYSERIAL0 SerialUART3
+#elif SERIAL_PORT == 4
+ #define MYSERIAL0 SerialUART4
+#elif SERIAL_PORT == 5
+ #define MYSERIAL0 SerialUART5
+#elif SERIAL_PORT == 6
+ #define MYSERIAL0 SerialUART6
+#endif
+
+#ifdef SERIAL_PORT_2
+ #if SERIAL_PORT_2 == 0
+ #error "Serial port 0 does not exist"
+ #endif
+
+ #if !WITHIN(SERIAL_PORT_2, -1, 6)
+ #error "SERIAL_PORT_2 must be from -1 to 6"
+ #elif SERIAL_PORT_2 == SERIAL_PORT
+ #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
+ #endif
+ #define NUM_SERIAL 2
+ #if SERIAL_PORT_2 == -1
+ #define MYSERIAL1 SerialUSB
+ #elif SERIAL_PORT_2 == 1
+ #define MYSERIAL1 SerialUART1
+ #elif SERIAL_PORT_2 == 2
+ #define MYSERIAL1 SerialUART2
+ #elif SERIAL_PORT_2 == 3
+ #define MYSERIAL1 SerialUART3
+ #elif SERIAL_PORT_2 == 4
+ #define MYSERIAL1 SerialUART4
+ #elif SERIAL_PORT_2 == 5
+ #define MYSERIAL1 SerialUART5
+ #elif SERIAL_PORT_2 == 6
+ #define MYSERIAL1 SerialUART6
+ #endif
+#else
+ #define NUM_SERIAL 1
+#endif
+
+#define _BV(b) (1 << (b))
+
+/**
+ * TODO: review this to return 1 for pins that are not analog input
+ */
+#ifndef analogInputToDigitalPin
+ #define analogInputToDigitalPin(p) (p)
+#endif
+
+#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
+#define CRITICAL_SECTION_END if (!primask) __enable_irq()
+#define ISRS_ENABLED() (!__get_PRIMASK())
+#define ENABLE_ISRS() __enable_irq()
+#define DISABLE_ISRS() __disable_irq()
+
+// On AVR this is in math.h?
+#define square(x) ((x)*(x))
+
+#ifndef strncpy_P
+ #define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
+#endif
+
+// Fix bug in pgm_read_ptr
+#undef pgm_read_ptr
+#define pgm_read_ptr(addr) (*(addr))
+
+#define RST_POWER_ON 1
+#define RST_EXTERNAL 2
+#define RST_BROWN_OUT 4
+#define RST_WATCHDOG 8
+#define RST_JTAG 16
+#define RST_SOFTWARE 32
+#define RST_BACKUP 64
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+typedef int8_t pin_t;
+
+#define HAL_SERVO_LIB libServo
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+/** result of last ADC conversion */
+extern uint16_t HAL_adc_result;
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+// Disable interrupts
+#define cli() do { DISABLE_TEMPERATURE_INTERRUPT(); DISABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
+
+// Enable interrupts
+#define sei() do { ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
+
+// Memory related
+#define __bss_end __bss_end__
+
+/** clear reset reason */
+void HAL_clear_reset_source (void);
+
+/** reset reason */
+uint8_t HAL_get_reset_source (void);
+
+void _delay_ms(const int delay);
+
+/*
+extern "C" {
+ int freeMemory(void);
+}
+*/
+
+extern "C" char* _sbrk(int incr);
+
+/*
+static int freeMemory() {
+ volatile int top;
+ top = (int)((char*)&top - reinterpret_cast(_sbrk(0)));
+ return top;
+}
+*/
+
+static int freeMemory() {
+ volatile char top;
+ return &top - reinterpret_cast(_sbrk(0));
+}
+
+// SPI: Extended functions which take a channel number (hardware SPI only)
+/** Write single byte to specified SPI channel */
+void spiSend(uint32_t chan, byte b);
+/** Write buffer to specified SPI channel */
+void spiSend(uint32_t chan, const uint8_t* buf, size_t n);
+/** Read single byte from specified SPI channel */
+uint8_t spiRec(uint32_t chan);
+
+
+// EEPROM
+
+/**
+ * TODO: Write all this eeprom stuff. Can emulate eeprom in flash as last resort.
+ * Wire library should work for i2c eeproms.
+ */
+void eeprom_write_byte(unsigned char *pos, unsigned char value);
+unsigned char eeprom_read_byte(unsigned char *pos);
+void eeprom_read_block (void *__dst, const void *__src, size_t __n);
+void eeprom_update_block (const void *__src, void *__dst, size_t __n);
+
+// ADC
+
+#define HAL_ANALOG_SELECT(pin) pinMode(pin, INPUT)
+
+inline void HAL_adc_init(void) {}
+
+#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
+#define HAL_READ_ADC() HAL_adc_result
+#define HAL_ADC_READY() true
+
+void HAL_adc_start_conversion(const uint8_t adc_pin);
+
+uint16_t HAL_adc_get_result(void);
+
+/* Todo: Confirm none of this is needed.
+uint16_t HAL_getAdcReading(uint8_t chan);
+
+void HAL_startAdcConversion(uint8_t chan);
+uint8_t HAL_pinToAdcChannel(int pin);
+
+uint16_t HAL_getAdcFreerun(uint8_t chan, bool wait_for_conversion = false);
+//uint16_t HAL_getAdcSuperSample(uint8_t chan);
+
+void HAL_enable_AdcFreerun(void);
+//void HAL_disable_AdcFreerun(uint8_t chan);
+
+*/
+
+#define GET_PIN_MAP_PIN(index) index
+#define GET_PIN_MAP_INDEX(pin) pin
+#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
+
+#endif // _HAL_STM32F4_H
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
new file mode 100644
index 000000000000..2877e88d54b7
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
@@ -0,0 +1,53 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (C) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#if defined(STM32F4) || defined(STM32F4xx)
+
+#include "../../inc/MarlinConfig.h"
+
+#if HAS_SERVOS
+
+#include "HAL_Servo_STM32F4.h"
+
+int8_t libServo::attach(const int pin) {
+ return Servo::attach(pin);
+}
+
+int8_t libServo::attach(const int pin, const int min, const int max) {
+ return Servo::attach(pin, min, max);
+}
+
+void libServo::move(const int value) {
+ constexpr uint16_t servo_delay[] = SERVO_DELAY;
+ static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
+ if (this->attach(0) >= 0) {
+ this->write(value);
+ safe_delay(servo_delay[this->servoIndex]);
+ #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
+ this->detach();
+ #endif
+ }
+}
+#endif // HAS_SERVOS
+
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_SanityCheck.h b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
similarity index 62%
rename from Marlin/src/HAL/HAL_SanityCheck.h
rename to Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
index 7f5400d4267b..b68910387c09 100644
--- a/Marlin/src/HAL/HAL_SanityCheck.h
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
@@ -4,6 +4,7 @@
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (C) 2017 Victor Perez
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,28 +21,21 @@
*
*/
-#ifndef HAL_SANITYCHECK_H
+#ifndef HAL_SERVO_STM32F4_H
+#define HAL_SERVO_STM32F4_H
-#ifdef __AVR__
- #include "HAL_AVR/SanityCheck_AVR_8_bit.h"
+#include
- #elif defined(ARDUINO_ARCH_SAM)
- #include "HAL_DUE/SanityCheck_Due.h"
+// Inherit and expand on the official library
+class libServo : public Servo {
+public:
+ int8_t attach(const int pin);
+ int8_t attach(const int pin, const int min, const int max);
+ void move(const int value);
+private:
+ uint16_t min_ticks;
+ uint16_t max_ticks;
+ uint8_t servoIndex; // index into the channel data for this servo
+};
- #elif IS_32BIT_TEENSY
- #include "HAL_TEENSY35_36/SanityCheck_Teensy_35_36.h"
-
- #elif defined(TARGET_LPC1768)
- #include "HAL_LPC1768/SanityCheck.h"
-
- #elif defined(__STM32F1__)
- #include "HAL_STM32F1/SanityCheck_Stm32f1.h"
-
- #elif defined(STM32F7)
- #include "HAL_STM32F7/SanityCheck_STM32F7.h"
-
-#else
- #error Unsupported Platform!
-#endif
-
-#endif
+#endif // HAL_SERVO_STM32F4_H
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
new file mode 100644
index 000000000000..606d43f7f91e
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
@@ -0,0 +1,176 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (C) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Software SPI functions originally from Arduino Sd2Card Library
+ * Copyright (C) 2009 by William Greiman
+ */
+
+/**
+ * Adapted to the STM32F4 HAL
+ */
+
+#if defined(STM32F4) || defined(STM32F4xx)
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "HAL.h"
+#include "../HAL_SPI.h"
+#include "pins_arduino.h"
+#include "spi_pins.h"
+#include "../../core/macros.h"
+#include
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+static SPISettings spiConfig;
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+#if ENABLED(SOFTWARE_SPI)
+
+ // --------------------------------------------------------------------------
+ // Software SPI
+ // --------------------------------------------------------------------------
+ #error "Software SPI not supported for STM32F4. Use hardware SPI."
+
+#else
+
+// --------------------------------------------------------------------------
+// Hardware SPI
+// --------------------------------------------------------------------------
+
+/**
+ * VGPV SPI speed start and F_CPU/2, by default 72/2 = 36Mhz
+ */
+
+/**
+ * @brief Begin SPI port setup
+ *
+ * @return Nothing
+ *
+ * @details Only configures SS pin since libmaple creates and initialize the SPI object
+ */
+void spiBegin(void) {
+ #if !PIN_EXISTS(SS)
+ #error SS_PIN not defined!
+ #endif
+
+ OUT_WRITE(SS_PIN, HIGH);
+}
+
+/** Configure SPI for specified SPI speed */
+void spiInit(uint8_t spiRate) {
+ // Use datarates Marlin uses
+ uint32_t clock;
+ switch (spiRate) {
+ case SPI_FULL_SPEED: clock = 20000000; break; // 13.9mhz=20000000 6.75mhz=10000000 3.38mhz=5000000 .833mhz=1000000
+ case SPI_HALF_SPEED: clock = 5000000; break;
+ case SPI_QUARTER_SPEED: clock = 2500000; break;
+ case SPI_EIGHTH_SPEED: clock = 1250000; break;
+ case SPI_SPEED_5: clock = 625000; break;
+ case SPI_SPEED_6: clock = 300000; break;
+ default: clock = 4000000; // Default from the SPI libarary
+ }
+ spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
+ SPI.begin();
+}
+
+/**
+ * @brief Receives a single byte from the SPI port.
+ *
+ * @return Byte received
+ *
+ * @details
+ */
+uint8_t spiRec(void) {
+ SPI.beginTransaction(spiConfig);
+ uint8_t returnByte = SPI.transfer(0xFF);
+ SPI.endTransaction();
+ return returnByte;
+}
+
+/**
+ * @brief Receives a number of bytes from the SPI port to a buffer
+ *
+ * @param buf Pointer to starting address of buffer to write to.
+ * @param nbyte Number of bytes to receive.
+ * @return Nothing
+ *
+ * @details Uses DMA
+ */
+void spiRead(uint8_t* buf, uint16_t nbyte) {
+ SPI.beginTransaction(spiConfig);
+
+ #ifdef STM32GENERIC
+ SPI.dmaTransfer(0, const_cast(buf), nbyte);
+ #else
+ SPI.transfer((uint8_t*)buf, nbyte);
+ #endif
+
+ SPI.endTransaction();
+}
+
+/**
+ * @brief Sends a single byte on SPI port
+ *
+ * @param b Byte to send
+ *
+ * @details
+ */
+void spiSend(uint8_t b) {
+ SPI.beginTransaction(spiConfig);
+ SPI.transfer(b);
+ SPI.endTransaction();
+}
+
+/**
+ * @brief Write token and then write from 512 byte buffer to SPI (for SD card)
+ *
+ * @param buf Pointer with buffer start address
+ * @return Nothing
+ *
+ * @details Use DMA
+ */
+void spiSendBlock(uint8_t token, const uint8_t* buf) {
+ SPI.beginTransaction(spiConfig);
+ SPI.transfer(token);
+
+ #ifdef STM32GENERIC
+ SPI.dmaSend(const_cast(buf), 512);
+ #else
+ SPI.transfer((uint8_t*)buf, (uint8_t*)0, 512);
+ #endif
+
+ SPI.endTransaction();
+}
+
+#endif // SOFTWARE_SPI
+
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
new file mode 100644
index 000000000000..d03bf4c09b54
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
@@ -0,0 +1,159 @@
+/**
+ * Marlin 3D Printer Firmware
+ *
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#if defined(STM32F4) || defined(STM32F4xx)
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "HAL.h"
+
+#include "HAL_timers_STM32F4.h"
+
+// --------------------------------------------------------------------------
+// Externals
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Local defines
+// --------------------------------------------------------------------------
+
+#define NUM_HARDWARE_TIMERS 2
+#define STEP_TIMER_IRQ_ID TIM5_IRQn
+#define TEMP_TIMER_IRQ_ID TIM7_IRQn
+
+//#define PRESCALER 1
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private Variables
+// --------------------------------------------------------------------------
+
+stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
+
+// --------------------------------------------------------------------------
+// Function prototypes
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Private functions
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+bool timers_initialised[NUM_HARDWARE_TIMERS] = {false};
+
+void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
+
+ if (!timers_initialised[timer_num]) {
+ constexpr uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
+ temp_prescaler = TEMP_TIMER_PRESCALE - 1;
+ switch (timer_num) {
+ case STEP_TIMER_NUM:
+ // STEPPER TIMER TIM5 - use a 32bit timer
+ #ifdef STM32GENERIC
+ __HAL_RCC_TIM5_CLK_ENABLE();
+ TimerHandle[timer_num].handle.Instance = TIM5;
+ TimerHandle[timer_num].handle.Init.Prescaler = step_prescaler;
+ TimerHandle[timer_num].handle.Init.CounterMode = TIM_COUNTERMODE_UP;
+ TimerHandle[timer_num].handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
+ TimerHandle[timer_num].callback = (uint32_t)TC5_Handler;
+ #else
+ TimerHandle[timer_num].timer = TIM5;
+ TimerHandle[timer_num].irqHandle = TC5_Handler;
+ TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / step_prescaler) / frequency) - 1, step_prescaler);
+ #endif
+ HAL_NVIC_SetPriority(STEP_TIMER_IRQ_ID, 6, 0);
+ break;
+
+ case TEMP_TIMER_NUM:
+ // TEMP TIMER TIM7 - any available 16bit Timer (1 already used for PWM)
+ #ifdef STM32GENERIC
+ __HAL_RCC_TIM7_CLK_ENABLE();
+ TimerHandle[timer_num].handle.Instance = TIM7;
+ TimerHandle[timer_num].handle.Init.Prescaler = temp_prescaler;
+ TimerHandle[timer_num].handle.Init.CounterMode = TIM_COUNTERMODE_UP;
+ TimerHandle[timer_num].handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
+ TimerHandle[timer_num].callback = (uint32_t)TC7_Handler;
+ #else
+ TimerHandle[timer_num].timer = TIM7;
+ TimerHandle[timer_num].irqHandle = TC7_Handler;
+ TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / temp_prescaler) / frequency) - 1, temp_prescaler);
+ #endif
+ HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_ID, 2, 0);
+ break;
+ }
+ timers_initialised[timer_num] = true;
+ }
+
+ #ifdef STM32GENERIC
+ TimerHandle[timer_num].handle.Init.Period = (((HAL_TIMER_RATE) / TimerHandle[timer_num].handle.Init.Prescaler) / frequency) - 1;
+ if (HAL_TIM_Base_Init(&TimerHandle[timer_num].handle) == HAL_OK)
+ HAL_TIM_Base_Start_IT(&TimerHandle[timer_num].handle);
+ #endif
+}
+
+#ifdef STM32GENERIC
+ extern "C" void TIM5_IRQHandler() {
+ ((void(*)(void))TimerHandle[0].callback)();
+ }
+ extern "C" void TIM7_IRQHandler() {
+ ((void(*)(void))TimerHandle[1].callback)();
+ }
+#endif
+
+void HAL_timer_enable_interrupt(const uint8_t timer_num) {
+ switch (timer_num) {
+ case STEP_TIMER_NUM: HAL_NVIC_EnableIRQ(STEP_TIMER_IRQ_ID); break;
+ case TEMP_TIMER_NUM: HAL_NVIC_EnableIRQ(TEMP_TIMER_IRQ_ID); break;
+ }
+}
+
+void HAL_timer_disable_interrupt(const uint8_t timer_num) {
+ switch (timer_num) {
+ case STEP_TIMER_NUM: HAL_NVIC_DisableIRQ(STEP_TIMER_IRQ_ID); break;
+ case TEMP_TIMER_NUM: HAL_NVIC_DisableIRQ(TEMP_TIMER_IRQ_ID); break;
+ }
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
+}
+
+bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
+ switch (timer_num) {
+ case STEP_TIMER_NUM: return NVIC->ISER[(uint32_t)((int32_t)STEP_TIMER_IRQ_ID) >> 5] & (uint32_t)(1 << ((uint32_t)((int32_t)STEP_TIMER_IRQ_ID) & (uint32_t)0x1F));
+ case TEMP_TIMER_NUM: return NVIC->ISER[(uint32_t)((int32_t)TEMP_TIMER_IRQ_ID) >> 5] & (uint32_t)(1 << ((uint32_t)((int32_t)TEMP_TIMER_IRQ_ID) & (uint32_t)0x1F));
+ }
+ return false;
+}
+
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
new file mode 100644
index 000000000000..943550d13fdc
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
@@ -0,0 +1,140 @@
+/**
+ * Marlin 3D Printer Firmware
+ *
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ * Copyright (c) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef _HAL_TIMERS_STM32F4_H
+#define _HAL_TIMERS_STM32F4_H
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include
+
+// --------------------------------------------------------------------------
+// Defines
+// --------------------------------------------------------------------------
+
+#define FORCE_INLINE __attribute__((always_inline)) inline
+
+#define hal_timer_t uint32_t // TODO: One is 16-bit, one 32-bit - does this need to be checked?
+#define HAL_TIMER_TYPE_MAX 0xFFFF
+
+#define HAL_TIMER_RATE (HAL_RCC_GetSysClockFreq() / 2) // frequency of timer peripherals
+
+#define STEP_TIMER_NUM 0 // index of timer to use for stepper
+#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
+#define PULSE_TIMER_NUM STEP_TIMER_NUM
+
+#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz
+#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
+
+#define STEPPER_TIMER_PRESCALE 54 // was 40,prescaler for setting stepper timer, 2Mhz
+#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
+
+#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
+#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
+#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
+
+#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
+#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
+
+// TODO change this
+
+#ifdef STM32GENERIC
+ extern void TC5_Handler();
+ extern void TC7_Handler();
+ #define HAL_STEP_TIMER_ISR void TC5_Handler()
+ #define HAL_TEMP_TIMER_ISR void TC7_Handler()
+#else
+ extern void TC5_Handler(stimer_t *htim);
+ extern void TC7_Handler(stimer_t *htim);
+ #define HAL_STEP_TIMER_ISR void TC5_Handler(stimer_t *htim)
+ #define HAL_TEMP_TIMER_ISR void TC7_Handler(stimer_t *htim)
+#endif
+
+
+// --------------------------------------------------------------------------
+// Types
+// --------------------------------------------------------------------------
+
+#ifdef STM32GENERIC
+ typedef struct {
+ TIM_HandleTypeDef handle;
+ uint32_t callback;
+ } tTimerConfig;
+ typedef tTimerConfig stm32f4_timer_t;
+#else
+ typedef stimer_t stm32f4_timer_t;
+#endif
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+extern stm32f4_timer_t TimerHandle[];
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
+void HAL_timer_enable_interrupt(const uint8_t timer_num);
+void HAL_timer_disable_interrupt(const uint8_t timer_num);
+bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
+
+FORCE_INLINE static uint32_t HAL_timer_get_count(const uint8_t timer_num) {
+ return __HAL_TIM_GET_COUNTER(&TimerHandle[timer_num].handle);
+}
+
+FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
+ __HAL_TIM_SET_AUTORELOAD(&TimerHandle[timer_num].handle, compare);
+ if (HAL_timer_get_count(timer_num) >= compare)
+ TimerHandle[timer_num].handle.Instance->EGR |= TIM_EGR_UG; // Generate an immediate update interrupt
+}
+
+FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
+ return __HAL_TIM_GET_AUTORELOAD(&TimerHandle[timer_num].handle);
+}
+
+FORCE_INLINE static void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_ticks) {
+ const hal_timer_t mincmp = HAL_timer_get_count(timer_num) + interval_ticks;
+ if (HAL_timer_get_compare(timer_num) < mincmp)
+ HAL_timer_set_compare(timer_num, mincmp);
+}
+
+#ifdef STM32GENERIC
+ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
+ if (__HAL_TIM_GET_FLAG(&TimerHandle[timer_num].handle, TIM_FLAG_UPDATE) == SET)
+ __HAL_TIM_CLEAR_FLAG(&TimerHandle[timer_num].handle, TIM_FLAG_UPDATE);
+ }
+#else
+ #define HAL_timer_isr_prologue(TIMER_NUM)
+#endif
+
+#define HAL_timer_isr_epilogue(TIMER_NUM)
+
+#endif // _HAL_TIMERS_STM32F4_H
diff --git a/Marlin/src/HAL/HAL_STM32F4/README.md b/Marlin/src/HAL/HAL_STM32F4/README.md
new file mode 100644
index 000000000000..10396e875b88
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/README.md
@@ -0,0 +1,12 @@
+# This HAL is for the STM32F407 MCU used with STM32Generic Arduino core by danieleff.
+
+# Arduino core is located at:
+
+https://github.com/danieleff/STM32GENERIC
+
+Unzip it into [Arduino]/hardware folder
+
+# This HAL is in development.
+
+This HAL is a modified version of Chris Barr's Picoprint STM32F4 HAL.
+
diff --git a/Marlin/src/HAL/HAL_STM32F7/SanityCheck_STM32F7.h b/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
similarity index 96%
rename from Marlin/src/HAL/HAL_STM32F7/SanityCheck_STM32F7.h
rename to Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
index 8799c4eca793..605eb9cb1589 100644
--- a/Marlin/src/HAL/HAL_STM32F7/SanityCheck_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
@@ -64,3 +64,7 @@
#endif
#endif
#endif // SPINDLE_LASER_ENABLE
+
+#if ENABLED(EMERGENCY_PARSER)
+ #error "EMERGENCY_PARSER is not yet implemented for STM32F4. Disable EMERGENCY_PARSER to continue."
+#endif
diff --git a/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h
new file mode 100644
index 000000000000..2ccfd570663c
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h
@@ -0,0 +1,62 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (C) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef _ENDSTOP_INTERRUPTS_H_
+#define _ENDSTOP_INTERRUPTS_H_
+
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
+
+void setup_endstop_interrupts(void) {
+ #if HAS_X_MAX
+ attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_X_MIN
+ attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Y_MAX
+ attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Y_MIN
+ attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z_MAX
+ attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z_MIN
+ attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z2_MAX
+ attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z2_MIN
+ attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
+ #endif
+ #if HAS_Z_MIN_PROBE_PIN
+ attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
+ #endif
+}
+
+#endif //_ENDSTOP_INTERRUPTS_H_
diff --git a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
new file mode 100644
index 000000000000..e185344dc2e7
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
@@ -0,0 +1,150 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (C) 2017 Victor Perez
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Fast I/O interfaces for STM32F4
+ * These use GPIO functions instead of Direct Port Manipulation, as on AVR.
+ */
+
+#ifndef _FASTIO_STM32F4_H
+#define _FASTIO_STM32F4_H
+
+#define _BV(b) (1 << (b))
+
+#define USEABLE_HARDWARE_PWM(p) true
+
+#define READ(IO) digitalRead(IO)
+#define WRITE(IO,V) digitalWrite(IO,V)
+#define WRITE_VAR(IO,V) WRITE(IO,V)
+
+#define _GET_MODE(IO)
+#define _SET_MODE(IO,M) pinMode(IO, M)
+#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) /*!< Output Push Pull Mode & GPIO_NOPULL */
+
+#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
+
+#define SET_INPUT(IO) _SET_MODE(IO, INPUT) /*!< Input Floating Mode */
+#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) /*!< Input with Pull-up activation */
+#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) /*!< Input with Pull-down activation */
+#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
+
+#define TOGGLE(IO) OUT_WRITE(IO, !READ(IO))
+
+#define GET_INPUT(IO)
+#define GET_OUTPUT(IO)
+#define GET_TIMER(IO)
+
+#define PORTA 0
+#define PORTB 1
+#define PORTC 2
+#define PORTD 3
+#define PORTE 4
+
+#define _STM32_PIN(_PORT,_PIN) ((PORT##_PORT * 16) + _PIN)
+
+#define PA0 _STM32_PIN(A, 0)
+#define PA1 _STM32_PIN(A, 1)
+#define PA2 _STM32_PIN(A, 2)
+#define PA3 _STM32_PIN(A, 3)
+#define PA4 _STM32_PIN(A, 4)
+#define PA5 _STM32_PIN(A, 5)
+#define PA6 _STM32_PIN(A, 6)
+#define PA7 _STM32_PIN(A, 7)
+#define PA8 _STM32_PIN(A, 8)
+#define PA9 _STM32_PIN(A, 9)
+#define PA10 _STM32_PIN(A, 10)
+#define PA11 _STM32_PIN(A, 11)
+#define PA12 _STM32_PIN(A, 12)
+#define PA13 _STM32_PIN(A, 13)
+#define PA14 _STM32_PIN(A, 14)
+#define PA15 _STM32_PIN(A, 15)
+
+#define PB0 _STM32_PIN(B, 0)
+#define PB1 _STM32_PIN(B, 1)
+#define PB2 _STM32_PIN(B, 2)
+#define PB3 _STM32_PIN(B, 3)
+#define PB4 _STM32_PIN(B, 4)
+#define PB5 _STM32_PIN(B, 5)
+#define PB6 _STM32_PIN(B, 6)
+#define PB7 _STM32_PIN(B, 7)
+#define PB8 _STM32_PIN(B, 8)
+#define PB9 _STM32_PIN(B, 9)
+#define PB10 _STM32_PIN(B, 10)
+#define PB11 _STM32_PIN(B, 11)
+#define PB12 _STM32_PIN(B, 12)
+#define PB13 _STM32_PIN(B, 13)
+#define PB14 _STM32_PIN(B, 14)
+#define PB15 _STM32_PIN(B, 15)
+
+#define PC0 _STM32_PIN(C, 0)
+#define PC1 _STM32_PIN(C, 1)
+#define PC2 _STM32_PIN(C, 2)
+#define PC3 _STM32_PIN(C, 3)
+#define PC4 _STM32_PIN(C, 4)
+#define PC5 _STM32_PIN(C, 5)
+#define PC6 _STM32_PIN(C, 6)
+#define PC7 _STM32_PIN(C, 7)
+#define PC8 _STM32_PIN(C, 8)
+#define PC9 _STM32_PIN(C, 9)
+#define PC10 _STM32_PIN(C, 10)
+#define PC11 _STM32_PIN(C, 11)
+#define PC12 _STM32_PIN(C, 12)
+#define PC13 _STM32_PIN(C, 13)
+#define PC14 _STM32_PIN(C, 14)
+#define PC15 _STM32_PIN(C, 15)
+
+#define PD0 _STM32_PIN(D, 0)
+#define PD1 _STM32_PIN(D, 1)
+#define PD2 _STM32_PIN(D, 2)
+#define PD3 _STM32_PIN(D, 3)
+#define PD4 _STM32_PIN(D, 4)
+#define PD5 _STM32_PIN(D, 5)
+#define PD6 _STM32_PIN(D, 6)
+#define PD7 _STM32_PIN(D, 7)
+#define PD8 _STM32_PIN(D, 8)
+#define PD9 _STM32_PIN(D, 9)
+#define PD10 _STM32_PIN(D, 10)
+#define PD11 _STM32_PIN(D, 11)
+#define PD12 _STM32_PIN(D, 12)
+#define PD13 _STM32_PIN(D, 13)
+#define PD14 _STM32_PIN(D, 14)
+#define PD15 _STM32_PIN(D, 15)
+
+#define PE0 _STM32_PIN(E, 0)
+#define PE1 _STM32_PIN(E, 1)
+#define PE2 _STM32_PIN(E, 2)
+#define PE3 _STM32_PIN(E, 3)
+#define PE4 _STM32_PIN(E, 4)
+#define PE5 _STM32_PIN(E, 5)
+#define PE6 _STM32_PIN(E, 6)
+#define PE7 _STM32_PIN(E, 7)
+#define PE8 _STM32_PIN(E, 8)
+#define PE9 _STM32_PIN(E, 9)
+#define PE10 _STM32_PIN(E, 10)
+#define PE11 _STM32_PIN(E, 11)
+#define PE12 _STM32_PIN(E, 12)
+#define PE13 _STM32_PIN(E, 13)
+#define PE14 _STM32_PIN(E, 14)
+#define PE15 _STM32_PIN(E, 15)
+
+#endif // _FASTIO_STM32F4_H
diff --git a/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp
new file mode 100644
index 000000000000..a896bded3047
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/persistent_store_impl.cpp
@@ -0,0 +1,74 @@
+/**
+ * Marlin 3D Printer Firmware
+ *
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
+ * Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#if defined(STM32F4) || defined(STM32F4xx)
+
+#include "../persistent_store_api.h"
+
+#include "../../inc/MarlinConfig.h"
+
+#if ENABLED(EEPROM_SETTINGS)
+
+namespace HAL {
+namespace PersistentStore {
+
+bool access_start() { return true; }
+bool access_finish() { return true; }
+
+bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
+ while (size--) {
+ uint8_t * const p = (uint8_t * const)pos;
+ uint8_t v = *value;
+ // EEPROM has only ~100,000 write cycles,
+ // so only write bytes that have changed!
+ if (v != eeprom_read_byte(p)) {
+ eeprom_write_byte(p, v);
+ if (eeprom_read_byte(p) != v) {
+ SERIAL_ECHO_START();
+ SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
+ return true;
+ }
+ }
+ crc16(crc, &v, 1);
+ pos++;
+ value++;
+ };
+ return false;
+}
+
+bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing) {
+ do {
+ uint8_t c = eeprom_read_byte((unsigned char*)pos);
+ if (writing) *value = c;
+ crc16(crc, &c, 1);
+ pos++;
+ value++;
+ } while (--size);
+ return false;
+}
+
+} // PersistentStore
+} // HAL
+
+#endif // EEPROM_SETTINGS
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/pinsDebug.h b/Marlin/src/HAL/HAL_STM32F4/pinsDebug.h
new file mode 100644
index 000000000000..e5022f79a482
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/pinsDebug.h
@@ -0,0 +1 @@
+#error Debug pins is not supported on this Platform!
diff --git a/Marlin/src/HAL/HAL_STM32F4/spi_pins.h b/Marlin/src/HAL/HAL_STM32F4/spi_pins.h
new file mode 100644
index 000000000000..f178ac8107fe
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/spi_pins.h
@@ -0,0 +1,41 @@
+/**
+* Marlin 3D Printer Firmware
+* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+*/
+
+#ifndef SPI_PINS_H_
+#define SPI_PINS_H_
+
+
+/**
+ * Define SPI Pins: SCK, MISO, MOSI, SS
+ *
+ */
+#ifndef SCK_PIN
+ #define SCK_PIN PA5
+#endif
+#ifndef MISO_PIN
+ #define MISO_PIN PA6
+#endif
+#ifndef MOSI_PIN
+ #define MOSI_PIN PA7
+#endif
+#ifndef SS_PIN
+ #define SS_PIN PA8
+#endif
+
+#endif // SPI_PINS_H_
diff --git a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
new file mode 100644
index 000000000000..f5dd6bdfae84
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
@@ -0,0 +1,57 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#if defined(STM32F4) || defined(STM32F4xx)
+
+#include "../../inc/MarlinConfig.h"
+
+#if ENABLED(USE_WATCHDOG)
+
+ #include "watchdog_STM32F4.h"
+
+ IWDG_HandleTypeDef hiwdg;
+
+ void watchdog_init() {
+ hiwdg.Instance = IWDG;
+ hiwdg.Init.Prescaler = IWDG_PRESCALER_32; //32kHz LSI clock and 32x prescalar = 1024Hz IWDG clock
+ hiwdg.Init.Reload = 4095; //4095 counts = 4 seconds at 1024Hz
+ if (HAL_IWDG_Init(&hiwdg) != HAL_OK) {
+ //Error_Handler();
+ }
+ }
+
+ void watchdog_reset() {
+ /* Refresh IWDG: reload counter */
+ if (HAL_IWDG_Refresh(&hiwdg) != HAL_OK) {
+ /* Refresh Error */
+ //Error_Handler();
+ }
+ else {
+ #if PIN_EXISTS(LED)
+ TOGGLE(LED_PIN); // heart beat indicator
+ #endif
+ }
+ }
+
+#endif // USE_WATCHDOG
+
+#endif // STM32F4 || STM32F4xx
diff --git a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h
new file mode 100644
index 000000000000..89295a78e166
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h
@@ -0,0 +1,33 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#ifndef WATCHDOG_STM32F4_H
+#define WATCHDOG_STM32F4_H
+
+#include "../../inc/MarlinConfig.h"
+
+extern IWDG_HandleTypeDef hiwdg;
+
+void watchdog_init();
+void watchdog_reset();
+
+#endif // WATCHDOG_STM32F1_H
diff --git a/Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h b/Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h
index 93d3322f15ec..d5c54985f568 100644
--- a/Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h
+++ b/Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h
@@ -9,7 +9,7 @@
******************************************************************************
* @attention
*
- * © Copyright 2016 STMicroelectronics International N.V.
+ * © Copyright © 2016 STMicroelectronics International N.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
// Includes
// --------------------------------------------------------------------------
#include "../../../inc/MarlinConfig.h"
-#include "../../HAL.h"
+#include "../HAL.h"
/* Exported constants --------------------------------------------------------*/
/* EEPROM emulation firmware error codes */
diff --git a/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp b/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
index c3cf6ee7ca11..390ff35de587 100644
--- a/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
@@ -30,7 +30,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include "EEPROM_Emul/eeprom_emul.h"
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL.cpp
similarity index 99%
rename from Marlin/src/HAL/HAL_STM32F7/HAL_STM32F7.cpp
rename to Marlin/src/HAL/HAL_STM32F7/HAL.cpp
index 04d0192dfd00..a5c4f394290c 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL.cpp
@@ -28,7 +28,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
//#include
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/HAL.h
similarity index 93%
rename from Marlin/src/HAL/HAL_STM32F7/HAL_STM32F7.h
rename to Marlin/src/HAL/HAL_STM32F7/HAL.h
index 814c21096fb5..c594392d881e 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL.h
@@ -21,11 +21,10 @@
*
*/
-
-
#ifndef _HAL_STM32F7_H
#define _HAL_STM32F7_H
+#define CPU_32_BIT
#undef DEBUG_NONE
#ifndef vsnprintf_P
@@ -40,6 +39,9 @@
#include "Arduino.h"
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
+
#include "fastio_STM32F7.h"
#include "watchdog_STM32F7.h"
@@ -107,8 +109,11 @@
#define analogInputToDigitalPin(p) (p)
#endif
-#define CRITICAL_SECTION_START noInterrupts();
-#define CRITICAL_SECTION_END interrupts();
+#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
+#define CRITICAL_SECTION_END if (!primask) __enable_irq()
+#define ISRS_ENABLED() (!__get_PRIMASK())
+#define ENABLE_ISRS() __enable_irq()
+#define DISABLE_ISRS() __disable_irq()
// On AVR this is in math.h?
#define square(x) ((x)*(x))
@@ -209,7 +214,8 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
inline void HAL_adc_init(void) {}
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
-#define HAL_READ_ADC HAL_adc_result
+#define HAL_READ_ADC() HAL_adc_result
+#define HAL_ADC_READY() true
void HAL_adc_start_conversion(const uint8_t adc_pin);
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp
index 87ebde5be998..43d95e905914 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp
@@ -39,9 +39,11 @@ int8_t libServo::attach(const int pin, const int min, const int max) {
}
void libServo::move(const int value) {
+ constexpr uint16_t servo_delay[] = SERVO_DELAY;
+ static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
if (this->attach(0) >= 0) {
this->write(value);
- delay(SERVO_DELAY);
+ safe_delay(servo_delay[this->servoIndex]);
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
this->detach();
#endif
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
index 623cfb9fa3eb..db595eeeb247 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
@@ -36,7 +36,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include "../HAL_SPI.h"
#include "pins_arduino.h"
#include "spi_pins.h"
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
index 3678d33de0f7..9454b71c812f 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
@@ -26,7 +26,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "../HAL.h"
+#include "HAL.h"
#include "HAL_timers_STM32F7.h"
@@ -127,6 +127,11 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num) {
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
HAL_NVIC_DisableIRQ(timerConfig[timer_num].IRQ_Id);
+
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
}
hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
index 7990614b027a..a97bad75fba2 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
@@ -38,21 +38,22 @@
#define hal_timer_t uint32_t // TODO: One is 16-bit, one 32-bit - does this need to be checked?
#define HAL_TIMER_TYPE_MAX 0xFFFF
-#define STEP_TIMER_NUM 0 // index of timer to use for stepper
-#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
-
#define HAL_TIMER_RATE (HAL_RCC_GetSysClockFreq() / 2) // frequency of timer peripherals
-#define STEPPER_TIMER_PRESCALE 54 // was 40,prescaler for setting stepper timer, 2Mhz
-#define HAL_STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
-#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+#define STEP_TIMER_NUM 0 // index of timer to use for stepper
+#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
#define PULSE_TIMER_NUM STEP_TIMER_NUM
-#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
-#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
+#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz
+
+#define STEPPER_TIMER_PRESCALE 54 // was 40,prescaler for setting stepper timer, 2Mhz
+#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
-#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
@@ -60,7 +61,6 @@
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
-#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr)DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
// TODO change this
@@ -99,5 +99,6 @@ uint32_t HAL_timer_get_count(const uint8_t timer_num);
void HAL_timer_restrain(const uint8_t timer_num, const uint16_t interval_ticks);
void HAL_timer_isr_prologue(const uint8_t timer_num);
+#define HAL_timer_isr_epilogue(TIMER_NUM)
#endif // _HAL_TIMERS_STM32F7_H
diff --git a/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h
new file mode 100644
index 000000000000..5bd0793a4d2f
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h
@@ -0,0 +1,70 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Test Re-ARM specific configuration values for errors at compile-time.
+ */
+#if ENABLED(SPINDLE_LASER_ENABLE)
+ #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
+ #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
+ #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
+ #error "SPINDLE_DIR_PIN not defined."
+ #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
+ #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
+ #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
+ #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
+ #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
+ #elif SPINDLE_LASER_POWERUP_DELAY < 1
+ #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
+ #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
+ #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
+ #elif !defined(SPINDLE_LASER_PWM_INVERT)
+ #error "SPINDLE_LASER_PWM_INVERT missing."
+ #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
+ #error "SPINDLE_LASER_PWM equation constant(s) missing."
+ #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
+ #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
+ #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
+ #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
+ #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
+ #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
+ #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
+ #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
+ #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
+ #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
+ #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
+ #endif
+ #endif
+#endif // SPINDLE_LASER_ENABLE
+
+#if ENABLED(EMERGENCY_PARSER)
+ #error "EMERGENCY_PARSER is not yet implemented for STM32F7. Disable EMERGENCY_PARSER to continue."
+#endif
diff --git a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp
index 667ec47e20f0..71562425b98f 100644
--- a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp
@@ -68,7 +68,7 @@
//definitions for the chopper config register
#define CHOPPER_MODE_STANDARD 0x0ul
#define CHOPPER_MODE_T_OFF_FAST_DECAY 0x4000ul
-#define T_OFF_PATTERN 0xful
+#define T_OFF_PATTERN 0xFul
#define RANDOM_TOFF_TIME 0x2000ul
#define BLANK_TIMING_PATTERN 0x18000ul
#define BLANK_TIMING_SHIFT 15
@@ -85,7 +85,7 @@
#define CURRENT_DOWN_STEP_SPEED_PATTERN 0x6000ul
#define SE_MAX_PATTERN 0xF00ul
#define SE_CURRENT_STEP_WIDTH_PATTERN 0x60ul
-#define SE_MIN_PATTERN 0xful
+#define SE_MIN_PATTERN 0xFul
//definitions for stall guard2 current register
#define STALL_GUARD_FILTER_ENABLED 0x10000ul
@@ -237,7 +237,7 @@ unsigned int TMC26XStepper::getSpeed(void) { return this->speed; }
*/
char TMC26XStepper::step(int steps_to_move) {
if (this->steps_left == 0) {
- this->steps_left = abs(steps_to_move); // how many steps to take
+ this->steps_left = ABS(steps_to_move); // how many steps to take
// determine direction based on whether steps_to_move is + or -:
if (steps_to_move > 0)
@@ -257,7 +257,7 @@ char TMC26XStepper::move(void) {
// rem if (time >= this->next_step_time) {
- if (abs(time - this->last_step_time) > this->step_delay) {
+ if (ABS(time - this->last_step_time) > this->step_delay) {
// increment or decrement the step number,
// depending on direction:
if (this->direction == 1)
@@ -297,8 +297,8 @@ char TMC26XStepper::stop(void) {
void TMC26XStepper::setCurrent(unsigned int current) {
unsigned char current_scaling = 0;
//calculate the current scaling from the max current setting (in mA)
- double mASetting = (double)current,
- resistor_value = (double)this->resistor;
+ float mASetting = (float)current,
+ resistor_value = (float)this->resistor;
// remove vsense flag
this->driver_configuration_register_value &= ~(VSENSE);
// Derived from I = (cs + 1) / 32 * (Vsense / Rsense)
@@ -340,8 +340,8 @@ void TMC26XStepper::setCurrent(unsigned int current) {
unsigned int TMC26XStepper::getCurrent(void) {
// Calculate the current according to the datasheet to be on the safe side.
// This is not the fastest but the most accurate and illustrative way.
- double result = (double)(stall_guard2_current_register_value & CURRENT_SCALING_PATTERN),
- resistor_value = (double)this->resistor,
+ float result = (float)(stall_guard2_current_register_value & CURRENT_SCALING_PATTERN),
+ resistor_value = (float)this->resistor,
voltage = (driver_configuration_register_value & VSENSE) ? 0.165 : 0.31;
result = (result + 1.0) / 32.0 * voltage / resistor_value * sq(1000.0);
return (unsigned int)result;
@@ -739,8 +739,8 @@ unsigned char TMC26XStepper::getCurrentCSReading(void) {
}
unsigned int TMC26XStepper::getCurrentCurrent(void) {
- double result = (double)getCurrentCSReading(),
- resistor_value = (double)this->resistor,
+ float result = (float)getCurrentCSReading(),
+ resistor_value = (float)this->resistor,
voltage = (driver_configuration_register_value & VSENSE)? 0.165 : 0.31;
result = (result + 1.0) / 32.0 * voltage / resistor_value * sq(1000.0);
return (unsigned int)result;
diff --git a/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
index 9317ae4385ae..5b2cdb3a9e03 100644
--- a/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
@@ -26,41 +26,37 @@
#ifndef _ENDSTOP_INTERRUPTS_H_
#define _ENDSTOP_INTERRUPTS_H_
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
+
void setup_endstop_interrupts(void) {
#if HAS_X_MAX
- pinMode(X_MAX_PIN, INPUT);
- attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE); // assign it
+ attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_X_MIN
- pinMode(X_MIN_PIN, INPUT);
attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Y_MAX
- pinMode(Y_MAX_PIN, INPUT);
attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Y_MIN
- pinMode(Y_MIN_PIN, INPUT);
attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z_MAX
- pinMode(Z_MAX_PIN, INPUT);
attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z_MIN
- pinMode(Z_MIN_PIN, INPUT);
attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z2_MAX
- pinMode(Z2_MAX_PIN, INPUT);
attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z2_MIN
- pinMode(Z2_MIN_PIN, INPUT);
attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
#endif
#if HAS_Z_MIN_PROBE_PIN
- pinMode(Z_MIN_PROBE_PIN, INPUT);
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
#endif
}
diff --git a/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
index dd8ca1e57952..2d82530b894a 100644
--- a/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
@@ -31,24 +31,154 @@
#define _BV(b) (1 << (b))
-#define READ(IO) digitalRead(IO)
-#define WRITE(IO, v) digitalWrite(IO,v)
-#define TOGGLE(IO) do{ _SET_OUTPUT(IO); digitalWrite(IO,!digitalRead(IO)); }while(0)
-#define WRITE_VAR(IO, v) digitalWrite(IO,v)
+#define READ(IO) digitalRead(IO)
+#define WRITE(IO,V) digitalWrite(IO,V)
+#define WRITE_VAR(IO,V) WRITE(IO,V)
#define _GET_MODE(IO)
-#define _SET_MODE(IO,M) pinMode(IO, M)
-#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) /*!< Output Push Pull Mode & GPIO_NOPULL */
+#define _SET_MODE(IO,M) pinMode(IO, M)
+#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) /*!< Output Push Pull Mode & GPIO_NOPULL */
-#define SET_INPUT(IO) _SET_MODE(IO, INPUT) /*!< Input Floating Mode */
-#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) /*!< Input with Pull-up activation */
-#define SET_INPUT_PULLDOW(IO) _SET_MODE(IO, INPUT_PULLDOWN) /*!< Input with Pull-down activation */
-#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); WRITE(IO, LOW); }while(0)
+#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
+
+#define SET_INPUT(IO) _SET_MODE(IO, INPUT) /*!< Input Floating Mode */
+#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) /*!< Input with Pull-up activation */
+#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) /*!< Input with Pull-down activation */
+#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
+
+#define TOGGLE(IO) OUT_WRITE(IO, !READ(IO))
#define GET_INPUT(IO)
#define GET_OUTPUT(IO)
#define GET_TIMER(IO)
-#define OUT_WRITE(IO, v) { _SET_OUTPUT(IO); WRITE(IO, v); }
+#define PORTA 0
+#define PORTB 1
+#define PORTC 2
+#define PORTD 3
+#define PORTE 4
+#define PORTF 5
+#define PORTG 6
+
+#define _STM32_PIN(_PORT,_PIN) ((PORT##_PORT * 16) + _PIN)
+
+#define PA0 _STM32_PIN(A, 0)
+#define PA1 _STM32_PIN(A, 1)
+#define PA2 _STM32_PIN(A, 2)
+#define PA3 _STM32_PIN(A, 3)
+#define PA4 _STM32_PIN(A, 4)
+#define PA5 _STM32_PIN(A, 5)
+#define PA6 _STM32_PIN(A, 6)
+#define PA7 _STM32_PIN(A, 7)
+#define PA8 _STM32_PIN(A, 8)
+#define PA9 _STM32_PIN(A, 9)
+#define PA10 _STM32_PIN(A, 10)
+#define PA11 _STM32_PIN(A, 11)
+#define PA12 _STM32_PIN(A, 12)
+#define PA13 _STM32_PIN(A, 13)
+#define PA14 _STM32_PIN(A, 14)
+#define PA15 _STM32_PIN(A, 15)
+
+#define PB0 _STM32_PIN(B, 0)
+#define PB1 _STM32_PIN(B, 1)
+#define PB2 _STM32_PIN(B, 2)
+#define PB3 _STM32_PIN(B, 3)
+#define PB4 _STM32_PIN(B, 4)
+#define PB5 _STM32_PIN(B, 5)
+#define PB6 _STM32_PIN(B, 6)
+#define PB7 _STM32_PIN(B, 7)
+#define PB8 _STM32_PIN(B, 8)
+#define PB9 _STM32_PIN(B, 9)
+#define PB10 _STM32_PIN(B, 10)
+#define PB11 _STM32_PIN(B, 11)
+#define PB12 _STM32_PIN(B, 12)
+#define PB13 _STM32_PIN(B, 13)
+#define PB14 _STM32_PIN(B, 14)
+#define PB15 _STM32_PIN(B, 15)
+
+#define PC0 _STM32_PIN(C, 0)
+#define PC1 _STM32_PIN(C, 1)
+#define PC2 _STM32_PIN(C, 2)
+#define PC3 _STM32_PIN(C, 3)
+#define PC4 _STM32_PIN(C, 4)
+#define PC5 _STM32_PIN(C, 5)
+#define PC6 _STM32_PIN(C, 6)
+#define PC7 _STM32_PIN(C, 7)
+#define PC8 _STM32_PIN(C, 8)
+#define PC9 _STM32_PIN(C, 9)
+#define PC10 _STM32_PIN(C, 10)
+#define PC11 _STM32_PIN(C, 11)
+#define PC12 _STM32_PIN(C, 12)
+#define PC13 _STM32_PIN(C, 13)
+#define PC14 _STM32_PIN(C, 14)
+#define PC15 _STM32_PIN(C, 15)
+
+#define PD0 _STM32_PIN(D, 0)
+#define PD1 _STM32_PIN(D, 1)
+#define PD2 _STM32_PIN(D, 2)
+#define PD3 _STM32_PIN(D, 3)
+#define PD4 _STM32_PIN(D, 4)
+#define PD5 _STM32_PIN(D, 5)
+#define PD6 _STM32_PIN(D, 6)
+#define PD7 _STM32_PIN(D, 7)
+#define PD8 _STM32_PIN(D, 8)
+#define PD9 _STM32_PIN(D, 9)
+#define PD10 _STM32_PIN(D, 10)
+#define PD11 _STM32_PIN(D, 11)
+#define PD12 _STM32_PIN(D, 12)
+#define PD13 _STM32_PIN(D, 13)
+#define PD14 _STM32_PIN(D, 14)
+#define PD15 _STM32_PIN(D, 15)
+
+#define PE0 _STM32_PIN(E, 0)
+#define PE1 _STM32_PIN(E, 1)
+#define PE2 _STM32_PIN(E, 2)
+#define PE3 _STM32_PIN(E, 3)
+#define PE4 _STM32_PIN(E, 4)
+#define PE5 _STM32_PIN(E, 5)
+#define PE6 _STM32_PIN(E, 6)
+#define PE7 _STM32_PIN(E, 7)
+#define PE8 _STM32_PIN(E, 8)
+#define PE9 _STM32_PIN(E, 9)
+#define PE10 _STM32_PIN(E, 10)
+#define PE11 _STM32_PIN(E, 11)
+#define PE12 _STM32_PIN(E, 12)
+#define PE13 _STM32_PIN(E, 13)
+#define PE14 _STM32_PIN(E, 14)
+#define PE15 _STM32_PIN(E, 15)
+
+#define PF0 _STM32_PIN(F, 0)
+#define PF1 _STM32_PIN(F, 1)
+#define PF2 _STM32_PIN(F, 2)
+#define PF3 _STM32_PIN(F, 3)
+#define PF4 _STM32_PIN(F, 4)
+#define PF5 _STM32_PIN(F, 5)
+#define PF6 _STM32_PIN(F, 6)
+#define PF7 _STM32_PIN(F, 7)
+#define PF8 _STM32_PIN(F, 8)
+#define PF9 _STM32_PIN(F, 9)
+#define PF10 _STM32_PIN(F, 10)
+#define PF11 _STM32_PIN(F, 11)
+#define PF12 _STM32_PIN(F, 12)
+#define PF13 _STM32_PIN(F, 13)
+#define PF14 _STM32_PIN(F, 14)
+#define PF15 _STM32_PIN(F, 15)
+
+#define PG0 _STM32_PIN(G, 0)
+#define PG1 _STM32_PIN(G, 1)
+#define PG2 _STM32_PIN(G, 2)
+#define PG3 _STM32_PIN(G, 3)
+#define PG4 _STM32_PIN(G, 4)
+#define PG5 _STM32_PIN(G, 5)
+#define PG6 _STM32_PIN(G, 6)
+#define PG7 _STM32_PIN(G, 7)
+#define PG8 _STM32_PIN(G, 8)
+#define PG9 _STM32_PIN(G, 9)
+#define PG10 _STM32_PIN(G, 10)
+#define PG11 _STM32_PIN(G, 11)
+#define PG12 _STM32_PIN(G, 12)
+#define PG13 _STM32_PIN(G, 13)
+#define PG14 _STM32_PIN(G, 14)
+#define PG15 _STM32_PIN(G, 15)
#endif // _FASTIO_STM32F7_H
diff --git a/Marlin/src/HAL/HAL_STM32F7/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32F7/persistent_store_impl.cpp
index ac4c3e794792..0cd37b9533da 100644
--- a/Marlin/src/HAL/HAL_STM32F7/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/persistent_store_impl.cpp
@@ -33,13 +33,8 @@
namespace HAL {
namespace PersistentStore {
-bool access_start() {
- return true;
-}
-
-bool access_finish(){
- return true;
-}
+bool access_start() { return true; }
+bool access_finish() { return true; }
bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
while (size--) {
diff --git a/Marlin/src/HAL/HAL_STM32F7/pinsDebug.h b/Marlin/src/HAL/HAL_STM32F7/pinsDebug.h
new file mode 100644
index 000000000000..e5022f79a482
--- /dev/null
+++ b/Marlin/src/HAL/HAL_STM32F7/pinsDebug.h
@@ -0,0 +1 @@
+#error Debug pins is not supported on this Platform!
diff --git a/Marlin/src/HAL/HAL_STM32F7/spi_pins.h b/Marlin/src/HAL/HAL_STM32F7/spi_pins.h
index 15bb48c19167..2d1e96ec592c 100644
--- a/Marlin/src/HAL/HAL_STM32F7/spi_pins.h
+++ b/Marlin/src/HAL/HAL_STM32F7/spi_pins.h
@@ -20,14 +20,13 @@
#ifndef SPI_PINS_H_
#define SPI_PINS_H_
-
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
*
*/
-#define SCK_PIN _STM32_PIN(PORTA, 5)
-#define MISO_PIN _STM32_PIN(PORTA, 6)
-#define MOSI_PIN _STM32_PIN(PORTA, 7)
-#define SS_PIN _STM32_PIN(PORTA, 8)
+#define SCK_PIN PA5
+#define MISO_PIN PA6
+#define MOSI_PIN PA7
+#define SS_PIN PA8
#endif // SPI_PINS_H_
diff --git a/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
index ffdb1e092ef2..977f0f9b7e54 100644
--- a/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
@@ -1,24 +1,24 @@
/**
-* Marlin 3D Printer Firmware
-* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
-*
-* Based on Sprinter and grbl.
-* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see .
-*
-*/
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
#ifndef WATCHDOG_STM32F7_H
#define WATCHDOG_STM32F7_H
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
similarity index 98%
rename from Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.cpp
rename to Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
index 2a94a19099e6..5bd3369e439a 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
@@ -25,7 +25,8 @@
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
-#include "../HAL.h"
+#include "HAL.h"
+#include "../Delay.h"
#include
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
similarity index 70%
rename from Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h
rename to Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
index ff9814710007..6a11bf93c943 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
@@ -1,23 +1,24 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
- Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
+/**
+ * Marlin 3D Printer Firmware
+ *
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
+ * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
/**
* Description: HAL for Teensy 3.5 and Teensy 3.6
@@ -26,6 +27,8 @@
#ifndef _HAL_TEENSY_H
#define _HAL_TEENSY_H
+#define CPU_32_BIT
+
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
@@ -39,6 +42,9 @@
#undef sq
#define sq(x) ((x)*(x))
+#include "../math_32bit.h"
+#include "../HAL_SPI.h"
+
#include "fastio_Teensy.h"
#include "watchdog_Teensy.h"
@@ -46,6 +52,10 @@
#include
+#define ST7920_DELAY_1 DELAY_NS(600)
+#define ST7920_DELAY_2 DELAY_NS(750)
+#define ST7920_DELAY_3 DELAY_NS(750)
+
// --------------------------------------------------------------------------
// Defines
// --------------------------------------------------------------------------
@@ -79,8 +89,11 @@ typedef int8_t pin_t;
#define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
#endif
-#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
-#define CRITICAL_SECTION_END SREG = _sreg;
+#define CRITICAL_SECTION_START uint32_t primask = __get_PRIMASK(); __disable_irq()
+#define CRITICAL_SECTION_END if (!primask) __enable_irq()
+#define ISRS_ENABLED() (!__get_PRIMASK())
+#define ENABLE_ISRS() __enable_irq()
+#define DISABLE_ISRS() __disable_irq()
#undef sq
#define sq(x) ((x)*(x))
@@ -129,7 +142,8 @@ uint8_t spiRec(uint32_t chan);
void HAL_adc_init();
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
-#define HAL_READ_ADC HAL_adc_get_result()
+#define HAL_READ_ADC() HAL_adc_get_result()
+#define HAL_ADC_READY() true
#define HAL_ANALOG_SELECT(pin) NOOP;
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.cpp
index f8905fc1e31a..ff56036ccd7a 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.cpp
@@ -1,25 +1,36 @@
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
-#include "HAL_Servo_Teensy.h"
#include "../../inc/MarlinConfig.h"
+#if HAS_SERVOS
+
+#include "HAL_Servo_Teensy.h"
+
+uint8_t servoPin[MAX_SERVOS] = { 0 };
+
int8_t libServo::attach(const int pin) {
if (this->servoIndex >= MAX_SERVOS) return -1;
- return Servo::attach(pin);
+ if (pin > 0) servoPin[this->servoIndex] = pin;
+ return Servo::attach(servoPin[this->servoIndex]);
}
int8_t libServo::attach(const int pin, const int min, const int max) {
- return Servo::attach(pin, min, max);
+ if (pin > 0) servoPin[this->servoIndex] = pin;
+ return Servo::attach(servoPin[this->servoIndex], min, max);
}
void libServo::move(const int value) {
+ constexpr uint16_t servo_delay[] = SERVO_DELAY;
+ static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
if (this->attach(0) >= 0) {
this->write(value);
- delay(SERVO_DELAY);
+ safe_delay(servo_delay[this->servoIndex]);
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
this->detach();
#endif
}
}
+#endif // HAS_SERVOS
+
#endif // __MK64FX512__ || __MK66FX1M0__
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp
index 3d52302fb502..3be0fdd3afd2 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp
@@ -1,6 +1,6 @@
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
-#include "../HAL.h"
+#include "HAL.h"
#include
#include
#include "spi_pins.h"
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp
index 03bf9dadd6b2..d31d9ddf671d 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp
@@ -26,9 +26,25 @@
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
-#include "../HAL.h"
+#include "HAL.h"
#include "HAL_timers_Teensy.h"
+/** \brief Instruction Synchronization Barrier
+ Instruction Synchronization Barrier flushes the pipeline in the processor,
+ so that all instructions following the ISB are fetched from cache or
+ memory, after the instruction has been completed.
+*/
+FORCE_INLINE static void __ISB(void) {
+ __asm__ __volatile__("isb 0xF":::"memory");
+}
+
+/** \brief Data Synchronization Barrier
+ This function acts as a special kind of Data Memory Barrier.
+ It completes when all explicit memory accesses before this instruction complete.
+*/
+FORCE_INLINE static void __DSB(void) {
+ __asm__ __volatile__("dsb 0xF":::"memory");
+}
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
switch (timer_num) {
@@ -65,6 +81,11 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num) {
case 0: NVIC_DISABLE_IRQ(IRQ_FTM0); break;
case 1: NVIC_DISABLE_IRQ(IRQ_FTM1); break;
}
+
+ // We NEED memory barriers to ensure Interrupts are actually disabled!
+ // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
+ __DSB();
+ __ISB();
}
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
index 102e840b17df..5fed19e31380 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
@@ -43,9 +43,6 @@
typedef uint32_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
-#define STEP_TIMER_NUM 0
-#define TEMP_TIMER_NUM 1
-
#define FTM0_TIMER_PRESCALE 8
#define FTM1_TIMER_PRESCALE 4
#define FTM0_TIMER_PRESCALE_BITS 0b011
@@ -54,19 +51,21 @@ typedef uint32_t hal_timer_t;
#define FTM0_TIMER_RATE (F_BUS / FTM0_TIMER_PRESCALE) // 60MHz / 8 = 7500kHz
#define FTM1_TIMER_RATE (F_BUS / FTM1_TIMER_PRESCALE) // 60MHz / 4 = 15MHz
-#define STEPPER_TIMER STEP_TIMER_NUM // Alias?
-#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / HAL_TICKS_PER_US)
+#define HAL_TIMER_RATE (FTM0_TIMER_RATE)
+#define STEP_TIMER_NUM 0
+#define TEMP_TIMER_NUM 1
#define PULSE_TIMER_NUM STEP_TIMER_NUM
-#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
-#define HAL_TIMER_RATE (FTM0_TIMER_RATE)
-#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE
-#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000)
+#define TEMP_TIMER_FREQUENCY 1000
-#define TEMP_TIMER_FREQUENCY 1000
+#define STEPPER_TIMER_RATE HAL_TIMER_RATE
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000)
+#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
-#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
@@ -78,8 +77,6 @@ typedef uint32_t hal_timer_t;
#define HAL_STEP_TIMER_ISR extern "C" void ftm0_isr(void) //void TC3_Handler()
#define HAL_TEMP_TIMER_ISR extern "C" void ftm1_isr(void) //void TC4_Handler()
-#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr) DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
-
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
@@ -115,5 +112,6 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num);
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
void HAL_timer_isr_prologue(const uint8_t timer_num);
+#define HAL_timer_isr_epilogue(TIMER_NUM)
#endif // _HAL_TIMERS_TEENSY_H
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck_Teensy_35_36.h b/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h
similarity index 86%
rename from Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck_Teensy_35_36.h
rename to Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h
index b4791bdb808f..c8a9ee9bdf15 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck_Teensy_35_36.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h
@@ -24,6 +24,6 @@
* Test TEENSY35_36 specific configuration values for errors at compile-time.
*/
-/**
- * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features.
- */
+#if ENABLED(EMERGENCY_PARSER)
+ #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
+#endif
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h b/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
index 0652c2997a38..00e1b8b38ac1 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
@@ -24,7 +24,7 @@
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
- * the stepper-ISR via endstops.update(), most of the time finding no change.
+ * the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
@@ -34,8 +34,13 @@
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
*/
- #ifndef _ENDSTOP_INTERRUPTS_H_
- #define _ENDSTOP_INTERRUPTS_H_
+#ifndef _ENDSTOP_INTERRUPTS_H_
+#define _ENDSTOP_INTERRUPTS_H_
+
+#include "../../module/endstops.h"
+
+// One ISR for all EXT-Interrupts
+void endstop_ISR(void) { endstops.update(); }
/**
* Endstop interrupts for Due based targets.
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
index ce31ed206a70..4d31310d8d41 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
@@ -30,7 +30,7 @@
#define _FASTIO_TEENSY_H
#ifndef MASK
- #define MASK(PIN) (1 << PIN)
+ #define MASK(PIN) (1 << PIN)
#endif
#define GPIO_BITBAND_ADDR(reg, bit) (((uint32_t)&(reg) - 0x40000000) * 32 + (bit) * 4 + 0x42000000)
@@ -44,38 +44,47 @@
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
*/
-#define _READ(p) ((bool)(CORE_PIN ## p ## _PINREG & CORE_PIN ## p ## _BITMASK))
-#define _WRITE(p, v) do { if (v) CORE_PIN ## p ## _PORTSET = CORE_PIN ## p ## _BITMASK; \
- else CORE_PIN ## p ## _PORTCLEAR = CORE_PIN ## p ## _BITMASK; } while (0)
-#define _TOGGLE(p) (*(&(CORE_PIN ## p ## _PORTCLEAR)+1) = CORE_PIN ## p ## _BITMASK)
-#define _SET_INPUT(p) do { CORE_PIN ## p ## _CONFIG = PORT_PCR_MUX(1); \
- GPIO_BITBAND(CORE_PIN ## p ## _DDRREG , CORE_PIN ## p ## _BIT) = 0; \
- } while (0)
-#define _SET_OUTPUT(p) do { CORE_PIN ## p ## _CONFIG = PORT_PCR_MUX(1)|PORT_PCR_SRE|PORT_PCR_DSE; \
- GPIO_BITBAND(CORE_PIN ## p ## _DDRREG , CORE_PIN ## p ## _BIT) = 1; \
- } while (0)
+#define _READ(p) bool(CORE_PIN ## p ## _PINREG & CORE_PIN ## p ## _BITMASK)
-//#define _PULLUP(IO, v) { pinMode(IO, (v!=LOW ? INPUT_PULLUP : INPUT)); }
+#define _WRITE(P,V) do{ \
+ if (V) CORE_PIN ## P ## _PORTSET = CORE_PIN ## P ## _BITMASK; \
+ else CORE_PIN ## P ## _PORTCLEAR = CORE_PIN ## P ## _BITMASK; \
+}while(0)
-#define _GET_INPUT(p) ((CORE_PIN ## p ## _DDRREG & CORE_PIN ## p ## _BITMASK) == 0)
-#define _GET_OUTPUT(p) ((CORE_PIN ## p ## _DDRREG & CORE_PIN ## p ## _BITMASK) == 0)
+#define _TOGGLE(P) (*(&(CORE_PIN ## P ## _PORTCLEAR)+1) = CORE_PIN ## P ## _BITMASK)
-//#define _GET_TIMER(IO)
+#define _SET_INPUT(P) do{ \
+ CORE_PIN ## P ## _CONFIG = PORT_PCR_MUX(1); \
+ GPIO_BITBAND(CORE_PIN ## P ## _DDRREG , CORE_PIN ## P ## _BIT) = 0; \
+}while(0)
-#define READ(IO) _READ(IO)
+#define _SET_OUTPUT(P) do{ \
+ CORE_PIN ## P ## _CONFIG = PORT_PCR_MUX(1)|PORT_PCR_SRE|PORT_PCR_DSE; \
+ GPIO_BITBAND(CORE_PIN ## P ## _DDRREG , CORE_PIN ## P ## _BIT) = 1; \
+}while(0)
-#define WRITE_VAR(IO, v) _WRITE_VAR(IO, v)
-#define WRITE(IO, v) _WRITE(IO, v)
-#define TOGGLE(IO) _TOGGLE(IO)
+#define _SET_INPUT_PULLUP(P) do{ \
+ CORE_PIN ## P ## _CONFIG = PORT_PCR_MUX(1) | PORT_PCR_PE | PORT_PCR_PS; \
+ GPIO_BITBAND(CORE_PIN ## P ## _DDRREG , CORE_PIN ## P ## _BIT) = 0; \
+}while(0)
-#define SET_INPUT(IO) _SET_INPUT(IO)
-#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
-#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
+#define _GET_INPUT(P) ((CORE_PIN ## P ## _DDRREG & CORE_PIN ## P ## _BITMASK) == 0)
+#define _GET_OUTPUT(P) ((CORE_PIN ## P ## _DDRREG & CORE_PIN ## P ## _BITMASK) == 0)
-#define GET_INPUT(IO) _GET_INPUT(IO)
-#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
+#define READ(IO) _READ(IO)
-#define OUT_WRITE(IO, v) { SET_OUTPUT(IO); WRITE(IO, v); }
+#define WRITE_VAR(IO,V) _WRITE_VAR(IO,V)
+#define WRITE(IO,V) _WRITE(IO,V)
+#define TOGGLE(IO) _TOGGLE(IO)
+
+#define SET_INPUT(IO) _SET_INPUT(IO)
+#define SET_INPUT_PULLUP(IO) _SET_INPUT_PULLUP(IO)
+#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
+
+#define GET_INPUT(IO) _GET_INPUT(IO)
+#define GET_OUTPUT(IO) _GET_OUTPUT(IO)
+
+#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
/**
* Ports, functions, and pins
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp
index be0604dae24c..550d2a851e6f 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp
@@ -9,13 +9,8 @@
namespace HAL {
namespace PersistentStore {
-bool access_start() {
- return true;
-}
-
-bool access_finish() {
- return true;
-}
+bool access_start() { return true; }
+bool access_finish() { return true; }
bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
while (size--) {
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_pinsDebug_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h
similarity index 100%
rename from Marlin/src/HAL/HAL_TEENSY35_36/HAL_pinsDebug_Teensy.h
rename to Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
index a286f4fc98bb..ca05dd225a72 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
@@ -23,7 +23,7 @@
#ifndef WATCHDOG_TEENSY_H
#define WATCHDOG_TEENSY_H
-#include "../HAL.h"
+#include "HAL.h"
// Arduino Due core now has watchdog support
diff --git a/Marlin/src/HAL/HAL_endstop_interrupts.h b/Marlin/src/HAL/HAL_endstop_interrupts.h
deleted file mode 100644
index 6a13090ca0ee..000000000000
--- a/Marlin/src/HAL/HAL_endstop_interrupts.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- *
- * Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- */
-
-#ifndef HAL_ENDSTOP_INTERRUPTS_H_
-#define HAL_ENDSTOP_INTERRUPTS_H_
-
-volatile uint8_t e_hit = 0; // Different from 0 when the endstops should be tested in detail.
- // Must be reset to 0 by the test function when finished.
-
-// This is what is really done inside the interrupts.
-FORCE_INLINE void endstop_ISR_worker( void ) {
- e_hit = 2; // Because the detection of a e-stop hit has a 1 step debouncer it has to be called at least twice.
-}
-
-// One ISR for all EXT-Interrupts
-void endstop_ISR(void) { endstop_ISR_worker(); }
-
-#ifdef __AVR__
-
- #include "HAL_AVR/endstop_interrupts.h"
-
-#elif defined(ARDUINO_ARCH_SAM)
-
- #include "HAL_DUE/endstop_interrupts.h"
-
-#elif IS_32BIT_TEENSY
-
- #include "HAL_TEENSY35_36/endstop_interrupts.h"
-
-#elif defined(__STM32F1__)
-
- #include "HAL_STM32F1/endstop_interrupts.h"
-
-#elif defined(STM32F7)
-
- #include "HAL_STM32F7/endstop_interrupts.h"
-
-#else
-
- #error Unsupported Platform!
-
-#endif
-
-#endif /* HAL_ENDSTOP_INTERRUPTS_H_ */
diff --git a/Marlin/src/HAL/I2cEeprom.cpp b/Marlin/src/HAL/I2cEeprom.cpp
index 27fa0062d876..874b99c80a35 100644
--- a/Marlin/src/HAL/I2cEeprom.cpp
+++ b/Marlin/src/HAL/I2cEeprom.cpp
@@ -33,7 +33,7 @@
// Includes
// --------------------------------------------------------------------------
-#include "HAL.h"
+#include HAL_PATH(., HAL.h)
#include
// --------------------------------------------------------------------------
diff --git a/Marlin/src/HAL/SpiEeprom.cpp b/Marlin/src/HAL/SpiEeprom.cpp
index f15978b686c3..6d36d1ca7e47 100644
--- a/Marlin/src/HAL/SpiEeprom.cpp
+++ b/Marlin/src/HAL/SpiEeprom.cpp
@@ -29,7 +29,7 @@
#if ENABLED(SPI_EEPROM)
-#include "HAL.h"
+#include HAL_PATH(., HAL.h)
#define CMD_WREN 6 // WREN
#define CMD_READ 2 // WRITE
diff --git a/Marlin/src/backtrace/backtrace.cpp b/Marlin/src/HAL/backtrace/backtrace.cpp
similarity index 96%
rename from Marlin/src/backtrace/backtrace.cpp
rename to Marlin/src/HAL/backtrace/backtrace.cpp
index 737626744c6c..4a688b369c77 100644
--- a/Marlin/src/backtrace/backtrace.cpp
+++ b/Marlin/src/HAL/backtrace/backtrace.cpp
@@ -26,7 +26,9 @@
#include "unwinder.h"
#include "unwmemaccess.h"
-#include "../Marlin.h"
+
+#include "../../core/serial.h"
+#include
// Dump a backtrace entry
static bool UnwReportOut(void* ctx, const UnwReport* bte) {
@@ -66,7 +68,7 @@ static const UnwindCallbacks UnwCallbacks = {
void backtrace(void) {
UnwindFrame btf;
- uint32_t sp,lr,pc;
+ uint32_t sp = 0, lr = 0, pc = 0;
// Capture the values of the registers to perform the traceback
__asm__ __volatile__ (
diff --git a/Marlin/src/backtrace/backtrace.h b/Marlin/src/HAL/backtrace/backtrace.h
similarity index 100%
rename from Marlin/src/backtrace/backtrace.h
rename to Marlin/src/HAL/backtrace/backtrace.h
diff --git a/Marlin/src/backtrace/unwarm.cpp b/Marlin/src/HAL/backtrace/unwarm.cpp
similarity index 98%
rename from Marlin/src/backtrace/unwarm.cpp
rename to Marlin/src/HAL/backtrace/unwarm.cpp
index 3257e1f44b84..f6d85b708b54 100644
--- a/Marlin/src/backtrace/unwarm.cpp
+++ b/Marlin/src/HAL/backtrace/unwarm.cpp
@@ -80,7 +80,7 @@ void UnwInitState(UnwState * const state, /**< Pointer to structure to fill.
// Detect if function names are available
static int __attribute__ ((noinline)) has_function_names(void) {
uint32_t flag_word = ((uint32_t*)(((uint32_t)(&has_function_names)) & (-4))) [-1];
- return ((flag_word & 0xff000000) == 0xff000000) ? 1 : 0;
+ return ((flag_word & 0xFF000000) == 0xFF000000) ? 1 : 0;
}
/**
@@ -171,5 +171,5 @@ bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * c
}
else return false; // Not in the hash, and failed to read from memory
}
-#endif
+#endif // __arm__ || __thumb__
diff --git a/Marlin/src/backtrace/unwarm.h b/Marlin/src/HAL/backtrace/unwarm.h
similarity index 98%
rename from Marlin/src/backtrace/unwarm.h
rename to Marlin/src/HAL/backtrace/unwarm.h
index 4e4e07e332a5..8ecdeba8a55e 100644
--- a/Marlin/src/backtrace/unwarm.h
+++ b/Marlin/src/HAL/backtrace/unwarm.h
@@ -104,7 +104,7 @@ typedef struct {
* Macros
**************************************************************************/
-#define M_IsOriginValid(v) (((v) & 0x7f) ? true : false)
+#define M_IsOriginValid(v) (((v) & 0x7F) ? true : false)
#define M_Origin2Str(v) ((v) ? "VALID" : "INVALID")
#if defined(UNW_DEBUG)
@@ -140,8 +140,4 @@ bool UnwMemWriteRegister(UnwState * const state, const uint32_t addr, const RegD
bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * const reg);
void UnwMemHashGC(UnwState * const state);
-#endif /* UNWARM_H */
-
-/* END OF FILE */
-
-
+#endif // UNWARM_H
diff --git a/Marlin/src/backtrace/unwarm_arm.cpp b/Marlin/src/HAL/backtrace/unwarm_arm.cpp
similarity index 99%
rename from Marlin/src/backtrace/unwarm_arm.cpp
rename to Marlin/src/HAL/backtrace/unwarm_arm.cpp
index 692c6a9699ee..09528885f706 100644
--- a/Marlin/src/backtrace/unwarm_arm.cpp
+++ b/Marlin/src/HAL/backtrace/unwarm_arm.cpp
@@ -593,4 +593,5 @@ UnwResult UnwStartArm(UnwState * const state) {
return UNWIND_UNSUPPORTED;
}
-#endif
+
+#endif // __arm__ || __thumb__
diff --git a/Marlin/src/backtrace/unwarm_thumb.cpp b/Marlin/src/HAL/backtrace/unwarm_thumb.cpp
similarity index 92%
rename from Marlin/src/backtrace/unwarm_thumb.cpp
rename to Marlin/src/HAL/backtrace/unwarm_thumb.cpp
index f2edc137243f..a4afbeaf8de0 100644
--- a/Marlin/src/backtrace/unwarm_thumb.cpp
+++ b/Marlin/src/HAL/backtrace/unwarm_thumb.cpp
@@ -28,7 +28,7 @@
static int32_t signExtend11(uint16_t value) {
if(value & 0x400) {
- value |= 0xfffff800;
+ value |= 0xFFFFF800;
}
return value;
@@ -66,7 +66,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* Detect 32bit thumb instructions
*/
- if ((instr & 0xe000) == 0xe000 && (instr & 0x1800) != 0) {
+ if ((instr & 0xE000) == 0xE000 && (instr & 0x1800) != 0) {
uint16_t instr2;
/* Check next address */
@@ -83,7 +83,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
* Load/Store multiple: Only interpret
* PUSH and POP
*/
- if ((instr & 0xfe6f) == 0xe82d) {
+ if ((instr & 0xFE6F) == 0xE82D) {
bool L = (instr & 0x10) ? true : false;
uint16_t rList = instr2;
@@ -171,7 +171,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* PUSH register
*/
- else if (instr == 0xf84d && (instr2 & 0x0fff) == 0x0d04) {
+ else if (instr == 0xF84D && (instr2 & 0x0FFF) == 0x0D04) {
uint8_t r = instr2 >> 12;
/* Store to memory: PUSH */
@@ -187,7 +187,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* POP register
*/
- else if (instr == 0xf85d && (instr2 & 0x0fff) == 0x0b04) {
+ else if (instr == 0xF85D && (instr2 & 0x0FFF) == 0x0B04) {
uint8_t r = instr2 >> 12;
/* Load from memory: POP */
@@ -246,7 +246,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* TBB / TBH
*/
- else if ((instr & 0xfff0) == 0xe8d0 && (instr2 & 0xffe0) == 0xf000) {
+ else if ((instr & 0xFFF0) == 0xE8D0 && (instr2 & 0xFFE0) == 0xF000) {
/* We are only interested in
* the forms
* TBB [PC, ...]
@@ -254,11 +254,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* as those are used by the C compiler to implement
* the switch clauses
*/
- uint8_t rn = instr & 0xf;
- uint8_t rm = instr2 & 0xf;
+ uint8_t rn = instr & 0xF;
bool H = (instr2 & 0x10) ? true : false;
- UnwPrintd5("TB%c [r%d,r%d%s]\n", H ? 'H' : 'B', rn, rm, H ? ",LSL #1" : "");
+ UnwPrintd5("TB%c [r%d,r%d%s]\n", H ? 'H' : 'B', rn, (instr2 & 0xF), H ? ",LSL #1" : "");
// We are only interested if the RN is the PC. Let's choose the 1st destination
if (rn == 15) {
@@ -280,19 +279,19 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* Unconditional branch
*/
- else if ((instr & 0xf800) == 0xf000 && (instr2 & 0xd000) == 0x9000) {
+ else if ((instr & 0xF800) == 0xF000 && (instr2 & 0xD000) == 0x9000) {
uint32_t v;
uint8_t S = (instr & 0x400) >> 10;
- uint16_t imm10 = (instr & 0x3ff);
+ uint16_t imm10 = (instr & 0x3FF);
uint8_t J1 = (instr2 & 0x2000) >> 13;
uint8_t J2 = (instr2 & 0x0800) >> 11;
- uint16_t imm11 = (instr2 & 0x7ff);
+ uint16_t imm11 = (instr2 & 0x7FF);
uint8_t I1 = J1 ^ S ^ 1;
uint8_t I2 = J2 ^ S ^ 1;
uint32_t imm32 = (S << 24) | (I1 << 23) | (I2 << 22) |(imm10 << 12) | (imm11 << 1);
- if (S) imm32 |= 0xfe000000;
+ if (S) imm32 |= 0xFE000000;
UnwPrintd2("B %d \n", imm32);
@@ -321,18 +320,18 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* Branch with link
*/
- else if ((instr & 0xf800) == 0xf000 && (instr2 & 0xd000) == 0xd000) {
+ else if ((instr & 0xF800) == 0xF000 && (instr2 & 0xD000) == 0xD000) {
uint8_t S = (instr & 0x400) >> 10;
- uint16_t imm10 = (instr & 0x3ff);
+ uint16_t imm10 = (instr & 0x3FF);
uint8_t J1 = (instr2 & 0x2000) >> 13;
uint8_t J2 = (instr2 & 0x0800) >> 11;
- uint16_t imm11 = (instr2 & 0x7ff);
+ uint16_t imm11 = (instr2 & 0x7FF);
uint8_t I1 = J1 ^ S ^ 1;
uint8_t I2 = J2 ^ S ^ 1;
uint32_t imm32 = (S << 24) | (I1 << 23) | (I2 << 22) |(imm10 << 12) | (imm11 << 1);
- if (S) imm32 |= 0xfe000000;
+ if (S) imm32 |= 0xFE000000;
UnwPrintd2("BL %d \n", imm32);
@@ -377,18 +376,18 @@ UnwResult UnwStartThumb(UnwState * const state) {
/*
* Conditional branches. Usually not taken, unless infinite loop is detected
*/
- else if ((instr & 0xf800) == 0xf000 && (instr2 & 0xd000) == 0x8000) {
+ else if ((instr & 0xF800) == 0xF000 && (instr2 & 0xD000) == 0x8000) {
uint8_t S = (instr & 0x400) >> 10;
- uint16_t imm6 = (instr & 0x3f);
+ uint16_t imm6 = (instr & 0x3F);
uint8_t J1 = (instr2 & 0x2000) >> 13;
uint8_t J2 = (instr2 & 0x0800) >> 11;
- uint16_t imm11 = (instr2 & 0x7ff);
+ uint16_t imm11 = (instr2 & 0x7FF);
uint8_t I1 = J1 ^ S ^ 1;
uint8_t I2 = J2 ^ S ^ 1;
uint32_t imm32 = (S << 20) | (I1 << 19) | (I2 << 18) |(imm6 << 12) | (imm11 << 1);
- if (S) imm32 |= 0xffe00000;
+ if (S) imm32 |= 0xFFE00000;
UnwPrintd2("Bcond %d\n", imm32);
@@ -412,9 +411,9 @@ UnwResult UnwStartThumb(UnwState * const state) {
* PC-relative load
* LDR Rd,[PC, #+/-imm]
*/
- else if((instr & 0xff7f) == 0xf85f) {
- uint8_t rt = (instr2 & 0xf000) >> 12;
- uint8_t imm12 = (instr2 & 0x0fff);
+ else if((instr & 0xFF7F) == 0xF85F) {
+ uint8_t rt = (instr2 & 0xF000) >> 12;
+ uint8_t imm12 = (instr2 & 0x0FFF);
bool A = (instr & 0x80) ? true : false;
uint32_t address;
@@ -434,10 +433,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* We are only interested when destination is PC.
* LDR Rt,[Rn , #n]
*/
- else if ((instr & 0xfff0) == 0xf8d0) {
- uint8_t rn = (instr & 0xf);
- uint8_t rt = (instr2 & 0xf000) >> 12;
- uint16_t imm12 = (instr2 & 0xfff);
+ else if ((instr & 0xFFF0) == 0xF8D0) {
+ uint8_t rn = (instr & 0xF);
+ uint8_t rt = (instr2 & 0xF000) >> 12;
+ uint16_t imm12 = (instr2 & 0xFFF);
/* If destination is PC and we don't know the source value, then fail */
if (!M_IsOriginValid(state->regData[rn].o)) {
@@ -456,10 +455,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* LDR Rt,[Rn], #+/-n]
* LDR Rt,[Rn, #+/-n]!
*/
- else if ((instr & 0xfff0) == 0xf850 && (instr2 & 0x0800) == 0x0800) {
- uint8_t rn = (instr & 0xf);
- uint8_t rt = (instr2 & 0xf000) >> 12;
- uint16_t imm8 = (instr2 & 0xff);
+ else if ((instr & 0xFFF0) == 0xF850 && (instr2 & 0x0800) == 0x0800) {
+ uint8_t rn = (instr & 0xF);
+ uint8_t rt = (instr2 & 0xF000) >> 12;
+ uint16_t imm8 = (instr2 & 0xFF);
bool P = (instr2 & 0x400) ? true : false;
bool U = (instr2 & 0x200) ? true : false;
bool W = (instr2 & 0x100) ? true : false;
@@ -493,10 +492,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* ldr Rt, [Rn, Rm, lsl #x]
* Where Rt is PC, Rn value is known, Rm is not known or unknown
*/
- else if ((instr & 0xfff0) == 0xf850 && (instr2 & 0x0fc0) == 0x0000) {
- uint8_t rn = (instr & 0xf);
- uint8_t rt = (instr2 & 0xf000) >> 12;
- uint8_t rm = (instr2 & 0xf);
+ else if ((instr & 0xFFF0) == 0xF850 && (instr2 & 0x0FC0) == 0x0000) {
+ uint8_t rn = (instr & 0xF);
+ uint8_t rt = (instr2 & 0xF000) >> 12;
+ uint8_t rm = (instr2 & 0xF);
uint8_t imm2 = (instr2 & 0x30) >> 4;
if (!M_IsOriginValid(state->regData[rn].o) ||
@@ -534,10 +533,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* LSR Rd, Rs, #Offset5
* ASR Rd, Rs, #Offset5
*/
- else if((instr & 0xe000) == 0x0000 && (instr & 0x1800) != 0x1800) {
+ else if((instr & 0xE000) == 0x0000 && (instr & 0x1800) != 0x1800) {
bool signExtend;
uint8_t op = (instr & 0x1800) >> 11;
- uint8_t offset5 = (instr & 0x07c0) >> 6;
+ uint8_t offset5 = (instr & 0x07C0) >> 6;
uint8_t rs = (instr & 0x0038) >> 3;
uint8_t rd = (instr & 0x0007);
@@ -562,7 +561,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
signExtend = (state->regData[rs].v & 0x8000) ? true : false;
state->regData[rd].v = state->regData[rs].v >> offset5;
if(signExtend) {
- state->regData[rd].v |= 0xffffffff << (32 - offset5);
+ state->regData[rd].v |= 0xFFFFFFFF << (32 - offset5);
}
state->regData[rd].o = state->regData[rs].o;
state->regData[rd].o |= REG_VAL_ARITHMETIC;
@@ -575,10 +574,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* SUB Rd, Rs, Rn
* SUB Rd, Rs, #Offset3
*/
- else if((instr & 0xf800) == 0x1800) {
+ else if((instr & 0xF800) == 0x1800) {
bool I = (instr & 0x0400) ? true : false;
bool op = (instr & 0x0200) ? true : false;
- uint8_t rn = (instr & 0x01c0) >> 6;
+ uint8_t rn = (instr & 0x01C0) >> 6;
uint8_t rs = (instr & 0x0038) >> 3;
uint8_t rd = (instr & 0x0007);
@@ -627,11 +626,11 @@ UnwResult UnwStartThumb(UnwState * const state) {
* ADD Rd, #Offset8
* SUB Rd, #Offset8
*/
- else if((instr & 0xe000) == 0x2000) {
+ else if((instr & 0xE000) == 0x2000) {
uint8_t op = (instr & 0x1800) >> 11;
uint8_t rd = (instr & 0x0700) >> 8;
- uint8_t offset8 = (instr & 0x00ff);
+ uint8_t offset8 = (instr & 0x00FF);
switch(op) {
case 0: /* MOV */
@@ -676,8 +675,8 @@ UnwResult UnwStartThumb(UnwState * const state) {
* BIC Rd, Rs
* MVN Rd, Rs
*/
- else if((instr & 0xfc00) == 0x4000) {
- uint8_t op = (instr & 0x03c0) >> 6;
+ else if((instr & 0xFC00) == 0x4000) {
+ uint8_t op = (instr & 0x03C0) >> 6;
uint8_t rs = (instr & 0x0038) >> 3;
uint8_t rd = (instr & 0x0007);
@@ -741,7 +740,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
case 4: /* ASR */
if(state->regData[rd].v & 0x80000000) {
state->regData[rd].v >>= state->regData[rs].v;
- state->regData[rd].v |= 0xffffffff << (32 - state->regData[rs].v);
+ state->regData[rd].v |= 0xFFFFFFFF << (32 - state->regData[rs].v);
}
else {
state->regData[rd].v >>= state->regData[rs].v;
@@ -826,7 +825,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
* CMP Hd, Rs
* MOV Hd, Hs
*/
- else if((instr & 0xfc00) == 0x4400) {
+ else if((instr & 0xFC00) == 0x4400) {
uint8_t op = (instr & 0x0300) >> 8;
bool h1 = (instr & 0x0080) ? true: false;
bool h2 = (instr & 0x0040) ? true: false;
@@ -894,9 +893,9 @@ UnwResult UnwStartThumb(UnwState * const state) {
/* Format 9: PC-relative load
* LDR Rd,[PC, #imm]
*/
- else if((instr & 0xf800) == 0x4800) {
+ else if((instr & 0xF800) == 0x4800) {
uint8_t rd = (instr & 0x0700) >> 8;
- uint8_t word8 = (instr & 0x00ff);
+ uint8_t word8 = (instr & 0x00FF);
uint32_t address;
/* Compute load address, adding a word to account for prefetch */
@@ -912,8 +911,8 @@ UnwResult UnwStartThumb(UnwState * const state) {
* ADD sp,#+imm
* ADD sp,#-imm
*/
- else if((instr & 0xff00) == 0xB000) {
- uint8_t value = (instr & 0x7f) * 4;
+ else if((instr & 0xFF00) == 0xB000) {
+ uint8_t value = (instr & 0x7F) * 4;
/* Check the negative bit */
if((instr & 0x80) != 0) {
@@ -931,10 +930,10 @@ UnwResult UnwStartThumb(UnwState * const state) {
* POP {Rlist}
* POP {Rlist, PC}
*/
- else if((instr & 0xf600) == 0xb400) {
+ else if((instr & 0xF600) == 0xB400) {
bool L = (instr & 0x0800) ? true : false;
bool R = (instr & 0x0100) ? true : false;
- uint8_t rList = (instr & 0x00ff);
+ uint8_t rList = (instr & 0x00FF);
if(L) {
uint8_t r;
@@ -1038,9 +1037,9 @@ UnwResult UnwStartThumb(UnwState * const state) {
* Conditional branches
* Bcond
*/
- else if((instr & 0xf000) == 0xd000) {
- int32_t branchValue = (instr & 0xff);
- if (branchValue & 0x80) branchValue |= 0xffffff00;
+ else if((instr & 0xF000) == 0xD000) {
+ int32_t branchValue = (instr & 0xFF);
+ if (branchValue & 0x80) branchValue |= 0xFFFFFF00;
/* Branch distance is twice that specified in the instruction. */
branchValue *= 2;
@@ -1067,9 +1066,9 @@ UnwResult UnwStartThumb(UnwState * const state) {
/* Format 18: unconditional branch
* B label
*/
- else if((instr & 0xf800) == 0xe000) {
+ else if((instr & 0xF800) == 0xE000) {
uint32_t v;
- int32_t branchValue = signExtend11(instr & 0x07ff);
+ int32_t branchValue = signExtend11(instr & 0x07FF);
/* Branch distance is twice that specified in the instruction. */
branchValue *= 2;
@@ -1125,5 +1124,4 @@ UnwResult UnwStartThumb(UnwState * const state) {
return UNWIND_SUCCESS;
}
-#endif
-
+#endif // __arm__ || __thumb__
diff --git a/Marlin/src/backtrace/unwarmbytab.cpp b/Marlin/src/HAL/backtrace/unwarmbytab.cpp
similarity index 85%
rename from Marlin/src/backtrace/unwarmbytab.cpp
rename to Marlin/src/HAL/backtrace/unwarmbytab.cpp
index 9827f25f6569..db49dcad7f83 100644
--- a/Marlin/src/backtrace/unwarmbytab.cpp
+++ b/Marlin/src/HAL/backtrace/unwarmbytab.cpp
@@ -29,7 +29,7 @@ void __aeabi_unwind_cpp_pr2(void) {};
static inline __attribute__((always_inline)) uint32_t prel31_to_addr(const uint32_t *prel31) {
uint32_t offset = (((uint32_t)(*prel31)) << 1) >> 1;
- return ((uint32_t)prel31 + offset) & 0x7fffffff;
+ return ((uint32_t)prel31 + offset) & 0x7FFFFFFF;
}
static const UnwTabEntry *UnwTabSearchIndex(const UnwTabEntry *start, const UnwTabEntry *end, uint32_t ip) {
@@ -54,8 +54,8 @@ static const char *UnwTabGetFunctionName(const UnwindCallbacks *cb, uint32_t add
if (!cb->readW(address-4,&flag_word))
return NULL;
- if ((flag_word & 0xff000000) == 0xff000000) {
- return (const char *)(address - 4 - (flag_word & 0x00ffffff));
+ if ((flag_word & 0xFF000000) == 0xFF000000) {
+ return (const char *)(address - 4 - (flag_word & 0x00FFFFFF));
}
return NULL;
}
@@ -77,7 +77,7 @@ static int UnwTabGetNextInstruction(const UnwindCallbacks *cb, UnwTabState *ucb)
uint32_t v = 0;
if (!cb->readW(ucb->current, &v))
return -1;
- instruction = (v >> (ucb->byte << 3)) & 0xff;
+ instruction = (v >> (ucb->byte << 3)) & 0xFF;
/* Move the next byte */
--ucb->byte;
@@ -104,12 +104,12 @@ static UnwResult UnwTabStateInit(const UnwindCallbacks *cb, UnwTabState *ucb, ui
if (!cb->readW(instructions, &v))
return UNWIND_DREAD_W_FAIL;
- if ((v & 0xff000000) == 0x80000000) {
+ if ((v & 0xFF000000) == 0x80000000) {
ucb->remaining = 3;
ucb->byte = 2;
/* Is a long unwind description */
- } else if ((v & 0xff000000) == 0x81000000) {
- ucb->remaining = ((v & 0x00ff0000) >> 14) + 2;
+ } else if ((v & 0xFF000000) == 0x81000000) {
+ ucb->remaining = ((v & 0x00FF0000) >> 14) + 2;
ucb->byte = 1;
} else
return UNWIND_UNSUPPORTED_DWARF_PERSONALITY;
@@ -129,7 +129,6 @@ static UnwResult UnwTabStateInit(const UnwindCallbacks *cb, UnwTabState *ucb, ui
*/
static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabState *ucb) {
- UnwResult err;
int instruction;
uint32_t mask;
uint32_t reg;
@@ -138,15 +137,15 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
/* Consume all instruction byte */
while ((instruction = UnwTabGetNextInstruction(cb, ucb)) != -1) {
- if ((instruction & 0xc0) == 0x00) { // ARM_EXIDX_CMD_DATA_POP
+ if ((instruction & 0xC0) == 0x00) { // ARM_EXIDX_CMD_DATA_POP
/* vsp = vsp + (xxxxxx << 2) + 4 */
- ucb->vrs[13] += ((instruction & 0x3f) << 2) + 4;
+ ucb->vrs[13] += ((instruction & 0x3F) << 2) + 4;
} else
- if ((instruction & 0xc0) == 0x40) { // ARM_EXIDX_CMD_DATA_PUSH
+ if ((instruction & 0xC0) == 0x40) { // ARM_EXIDX_CMD_DATA_PUSH
/* vsp = vsp - (xxxxxx << 2) - 4 */
- ucb->vrs[13] -= ((instruction & 0x3f) << 2) - 4;
+ ucb->vrs[13] -= ((instruction & 0x3F) << 2) - 4;
} else
- if ((instruction & 0xf0) == 0x80) {
+ if ((instruction & 0xF0) == 0x80) {
/* pop under mask {r15-r12},{r11-r4} or refuse to unwind */
instruction = instruction << 8 | UnwTabGetNextInstruction(cb, ucb);
@@ -156,7 +155,7 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
/* Pop registers using mask */ // ARM_EXIDX_CMD_REG_POP
vsp = ucb->vrs[13];
- mask = instruction & 0xfff;
+ mask = instruction & 0xFFF;
reg = 4;
while (mask) {
@@ -176,17 +175,17 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
ucb->vrs[13] = vsp;
} else
- if ((instruction & 0xf0) == 0x90 && // ARM_EXIDX_CMD_REG_TO_SP
- instruction != 0x9d &&
- instruction != 0x9f) {
+ if ((instruction & 0xF0) == 0x90 && // ARM_EXIDX_CMD_REG_TO_SP
+ instruction != 0x9D &&
+ instruction != 0x9F) {
/* vsp = r[nnnn] */
- ucb->vrs[13] = ucb->vrs[instruction & 0x0f];
+ ucb->vrs[13] = ucb->vrs[instruction & 0x0F];
} else
- if ((instruction & 0xf0) == 0xa0) { // ARM_EXIDX_CMD_REG_POP
+ if ((instruction & 0xF0) == 0xA0) { // ARM_EXIDX_CMD_REG_POP
/* pop r4-r[4+nnn] or pop r4-r[4+nnn], r14*/
vsp = ucb->vrs[13];
- for (reg = 4; reg <= (instruction & 0x07) + 4; ++reg) {
+ for (reg = 4; reg <= uint32_t((instruction & 0x07) + 4); ++reg) {
uint32_t v;
if (!cb->readW(vsp,&v))
return UNWIND_DREAD_W_FAIL;
@@ -206,7 +205,7 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
ucb->vrs[13] = vsp;
} else
- if (instruction == 0xb0) { // ARM_EXIDX_CMD_FINISH
+ if (instruction == 0xB0) { // ARM_EXIDX_CMD_FINISH
/* finished */
if (ucb->vrs[15] == 0)
ucb->vrs[15] = ucb->vrs[14];
@@ -215,7 +214,7 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
return UNWIND_SUCCESS;
} else
- if (instruction == 0xb1) { // ARM_EXIDX_CMD_REG_POP
+ if (instruction == 0xB1) { // ARM_EXIDX_CMD_REG_POP
/* pop register under mask {r3,r2,r1,r0} */
vsp = ucb->vrs[13];
mask = UnwTabGetNextInstruction(cb, ucb);
@@ -236,14 +235,14 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
ucb->vrs[13] = (uint32_t)vsp;
} else
- if (instruction == 0xb2) { // ARM_EXIDX_CMD_DATA_POP
+ if (instruction == 0xB2) { // ARM_EXIDX_CMD_DATA_POP
/* vps = vsp + 0x204 + (uleb128 << 2) */
ucb->vrs[13] += 0x204 + (UnwTabGetNextInstruction(cb, ucb) << 2);
} else
- if (instruction == 0xb3 || // ARM_EXIDX_CMD_VFP_POP
- instruction == 0xc8 ||
- instruction == 0xc9) {
+ if (instruction == 0xB3 || // ARM_EXIDX_CMD_VFP_POP
+ instruction == 0xC8 ||
+ instruction == 0xC9) {
/* pop VFP double-precision registers */
vsp = ucb->vrs[13];
@@ -256,12 +255,12 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
ucb->vrs[14] = v;
vsp += 4;
- if (instruction == 0xc8) {
+ if (instruction == 0xC8) {
/* D[16+sssss]-D[16+ssss+cccc] */
ucb->vrs[14] |= 1 << 16;
}
- if (instruction != 0xb3) {
+ if (instruction != 0xB3) {
/* D[sssss]-D[ssss+cccc] */
ucb->vrs[14] |= 1 << 17;
}
@@ -269,13 +268,13 @@ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabStat
ucb->vrs[13] = vsp;
} else
- if ((instruction & 0xf8) == 0xb8 ||
- (instruction & 0xf8) == 0xd0) {
+ if ((instruction & 0xF8) == 0xB8 ||
+ (instruction & 0xF8) == 0xD0) {
/* Pop VFP double precision registers D[8]-D[8+nnn] */
ucb->vrs[14] = 0x80 | (instruction & 0x07);
- if ((instruction & 0xf8) == 0xd0) {
+ if ((instruction & 0xF8) == 0xD0) {
ucb->vrs[14] = 1 << 17;
}
@@ -291,7 +290,7 @@ static inline __attribute__((always_inline)) uint32_t read_psp(void) {
/* Read the current PSP and return its value as a pointer */
uint32_t psp;
- __asm volatile (
+ __asm__ volatile (
" mrs %0, psp \n"
: "=r" (psp) : :
);
@@ -337,7 +336,7 @@ static UnwResult UnwTabUnwindFrame(const UnwindCallbacks *cb, UnwindFrame *frame
/* Check for exception return */
/* TODO Test with other ARM processors to verify this method. */
- if ((ucb.vrs[15] & 0xf0000000) == 0xf0000000) {
+ if ((ucb.vrs[15] & 0xF0000000) == 0xF0000000) {
/* According to the Cortex Programming Manual (p.44), the stack address is always 8-byte aligned (Cortex-M7).
Depending on where the exception came from (MSP or PSP), we need the right SP value to work with.
@@ -354,20 +353,20 @@ static UnwResult UnwTabUnwindFrame(const UnwindCallbacks *cb, UnwindFrame *frame
If we need to start from the PSP, we need to go up exactly 6 words to find the PC.
See the ARMv7-M Architecture Reference Manual p.594 and Cortex-M7 Processor Programming Manual p.44/p.45 for details.
*/
- if ((ucb.vrs[15] & 0xc) == 0) {
- /* Return to Handler Mode: MSP (0xffffff-1) */
+ if ((ucb.vrs[15] & 0xC) == 0) {
+ /* Return to Handler Mode: MSP (0xFFFFFF-1) */
stack = ucb.vrs[13];
/* The PC is always 2 words down from the MSP, if it was a non-floating-point exception */
stack -= 2*4;
- /* If there was a VFP exception (0xffffffe1), the PC is located another 18 words down */
- if ((ucb.vrs[15] & 0xf0) == 0xe0) {
+ /* If there was a VFP exception (0xFFFFFFE1), the PC is located another 18 words down */
+ if ((ucb.vrs[15] & 0xF0) == 0xE0) {
stack -= 18*4;
}
}
else {
- /* Return to Thread Mode: PSP (0xffffff-d) */
+ /* Return to Thread Mode: PSP (0xFFFFFF-d) */
stack = read_psp();
/* The PC is always 6 words up from the PSP */
@@ -423,7 +422,7 @@ UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void
const UnwTabEntry *index = UnwTabSearchIndex(__exidx_start, __exidx_end, frame->pc);
/* Clear last bit (Thumb indicator) */
- frame->pc &= 0xfffffffeU;
+ frame->pc &= 0xFFFFFFFEU;
/* Generate the backtrace information */
entry.address = frame->pc;
@@ -439,5 +438,4 @@ UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void
return err;
}
-#endif
-
+#endif // __arm__ || __thumb__
diff --git a/Marlin/src/backtrace/unwarmbytab.h b/Marlin/src/HAL/backtrace/unwarmbytab.h
similarity index 97%
rename from Marlin/src/backtrace/unwarmbytab.h
rename to Marlin/src/HAL/backtrace/unwarmbytab.h
index a17a6f7d669a..527d3a6c727d 100644
--- a/Marlin/src/backtrace/unwarmbytab.h
+++ b/Marlin/src/HAL/backtrace/unwarmbytab.h
@@ -31,6 +31,4 @@ typedef struct {
UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
-#endif
-
-/* END OF FILE */
+#endif // UNWARMBYTAB_H
diff --git a/Marlin/src/backtrace/unwarmmem.cpp b/Marlin/src/HAL/backtrace/unwarmmem.cpp
similarity index 96%
rename from Marlin/src/backtrace/unwarmmem.cpp
rename to Marlin/src/HAL/backtrace/unwarmmem.cpp
index bac3c8989725..7453fdb8dbb6 100644
--- a/Marlin/src/backtrace/unwarmmem.cpp
+++ b/Marlin/src/HAL/backtrace/unwarmmem.cpp
@@ -19,7 +19,6 @@
#include "unwarmmem.h"
#include "unwarm.h"
-
#define M_IsIdxUsed(a, v) (((a)[v >> 3] & (1 << (v & 0x7))) ? true : false)
#define M_SetIdxUsed(a, v) ((a)[v >> 3] |= (1 << (v & 0x7)))
#define M_ClrIdxUsed(a, v) ((a)[v >> 3] &= ~(1 << (v & 0x7)))
@@ -91,9 +90,9 @@ bool UnwMemHashWrite(MemData * const memData, uint32_t addr, uint32_t val, bool
M_SetIdxUsed(memData->tracked, i);
}
else {
-#if defined(UNW_DEBUG)
- memData->v[i] = 0xdeadbeef;
-#endif
+ #if defined(UNW_DEBUG)
+ memData->v[i] = 0xDEADBEEF;
+ #endif
M_ClrIdxUsed(memData->tracked, i);
}
@@ -115,4 +114,5 @@ void UnwMemHashGC(UnwState * const state) {
}
}
}
-#endif
+
+#endif // __arm__ || __thumb__
diff --git a/Marlin/src/backtrace/unwarmmem.h b/Marlin/src/HAL/backtrace/unwarmmem.h
similarity index 100%
rename from Marlin/src/backtrace/unwarmmem.h
rename to Marlin/src/HAL/backtrace/unwarmmem.h
diff --git a/Marlin/src/backtrace/unwinder.cpp b/Marlin/src/HAL/backtrace/unwinder.cpp
similarity index 100%
rename from Marlin/src/backtrace/unwinder.cpp
rename to Marlin/src/HAL/backtrace/unwinder.cpp
diff --git a/Marlin/src/backtrace/unwinder.h b/Marlin/src/HAL/backtrace/unwinder.h
similarity index 100%
rename from Marlin/src/backtrace/unwinder.h
rename to Marlin/src/HAL/backtrace/unwinder.h
diff --git a/Marlin/src/backtrace/unwmemaccess.cpp b/Marlin/src/HAL/backtrace/unwmemaccess.cpp
similarity index 92%
rename from Marlin/src/backtrace/unwmemaccess.cpp
rename to Marlin/src/HAL/backtrace/unwmemaccess.cpp
index f7041d52d62b..b939be8803fa 100644
--- a/Marlin/src/backtrace/unwmemaccess.cpp
+++ b/Marlin/src/HAL/backtrace/unwmemaccess.cpp
@@ -62,6 +62,17 @@
#define END_FLASH_ADDR 0x00080000
#endif
+#if defined(STM32F4) || defined(STM32F4xx)
+// For STM32F407VET
+// SRAM (0x20000000 - 0x20030000) (192kb)
+// FLASH (0x08000000 - 0x08080000) (512kb)
+//
+#define START_SRAM_ADDR 0x20000000
+#define END_SRAM_ADDR 0x20030000
+#define START_FLASH_ADDR 0x08000000
+#define END_FLASH_ADDR 0x08080000
+#endif
+
#ifdef STM32F7
// For STM32F765 in BORG
// SRAM (0x20000000 - 0x20080000) (512kb)
diff --git a/Marlin/src/backtrace/unwmemaccess.h b/Marlin/src/HAL/backtrace/unwmemaccess.h
similarity index 100%
rename from Marlin/src/backtrace/unwmemaccess.h
rename to Marlin/src/HAL/backtrace/unwmemaccess.h
diff --git a/Marlin/src/HAL/math_32bit.h b/Marlin/src/HAL/math_32bit.h
index 98b6a55f9f10..a59d221369bf 100644
--- a/Marlin/src/HAL/math_32bit.h
+++ b/Marlin/src/HAL/math_32bit.h
@@ -23,11 +23,13 @@
#ifndef MATH_32BIT_H
#define MATH_32BIT_H
+#include "../core/macros.h"
+
/**
* Math helper functions for 32 bit CPUs
*/
-
-#define MultiU32X32toH32(intRes, longIn1, longIn2) intRes = ((uint64_t)longIn1 * longIn2 + 0x80000000) >> 32
-#define MultiU32X24toH32(intRes, longIn1, longIn2) intRes = ((uint64_t)longIn1 * longIn2 + 0x00800000) >> 24
+static FORCE_INLINE uint32_t MultiU32X24toH32(uint32_t longIn1, uint32_t longIn2) {
+ return ((uint64_t)longIn1 * longIn2 + 0x00800000) >> 24;
+}
#endif // MATH_32BIT_H
diff --git a/Marlin/src/HAL/platforms.h b/Marlin/src/HAL/platforms.h
new file mode 100644
index 000000000000..1410b21f9c6d
--- /dev/null
+++ b/Marlin/src/HAL/platforms.h
@@ -0,0 +1,32 @@
+#ifndef _HAL_PLATFORMS_H_
+#define _HAL_PLATFORMS_H_
+
+#ifndef HAL_PLATFORM
+
+#ifdef __AVR__
+ #define HAL_PLATFORM HAL_AVR
+#elif defined(ARDUINO_ARCH_SAM)
+ #define HAL_PLATFORM HAL_DUE
+#elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
+ #define HAL_PLATFORM HAL_TEENSY35_36
+#elif defined(TARGET_LPC1768)
+ #define HAL_PLATFORM HAL_LPC1768
+#elif defined(__STM32F1__) || defined(TARGET_STM32F1)
+ #define HAL_PLATFORM HAL_STM32F1
+#elif defined(STM32F4) || defined(STM32F4xx)
+ #define HAL_PLATFORM HAL_STM32F4
+#elif defined(STM32F7)
+ #define HAL_PLATFORM HAL_STM32F7
+#elif defined(ARDUINO_ARCH_ESP32)
+ #define HAL_PLATFORM HAL_ESP32
+#else
+ #error "Unsupported Platform!"
+#endif
+
+#endif // HAL_PLATFORM
+
+#define XSTR_(M) #M
+#define XSTR(M) XSTR_(M)
+#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL_PLATFORM/NAME)
+
+#endif // _HAL_PLATFORMS_H_
diff --git a/Marlin/src/HAL/servo.cpp b/Marlin/src/HAL/servo.cpp
index 26cf9533b4e8..a49aac0f998a 100644
--- a/Marlin/src/HAL/servo.cpp
+++ b/Marlin/src/HAL/servo.cpp
@@ -42,8 +42,8 @@
*
* write() - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.)
* writeMicroseconds() - Set the servo pulse width in microseconds.
- * move(pin, angle) - Sequence of attach(pin), write(angle), delay(SERVO_DELAY).
- * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after SERVO_DELAY.
+ * move(pin, angle) - Sequence of attach(pin), write(angle), safe_delay(servo_delay[servoIndex]).
+ * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after servo_delay[servoIndex].
* read() - Get the last-written servo pulse width as an angle between 0 and 180.
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
* attached() - Return true if a servo is attached.
@@ -51,10 +51,9 @@
*
*/
-
#include "../inc/MarlinConfig.h"
-#if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768))
+#if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768) || defined(STM32F4) || defined(STM32F4xx))
//#include
#include "servo.h"
@@ -99,7 +98,7 @@ int8_t Servo::attach(const int pin, const int min, const int max) {
if (pin > 0) servo_info[this->servoIndex].Pin.nbr = pin;
pinMode(servo_info[this->servoIndex].Pin.nbr, OUTPUT); // set servo pin to output
- // todo min/max check: abs(min - MIN_PULSE_WIDTH) /4 < 128
+ // todo min/max check: ABS(min - MIN_PULSE_WIDTH) /4 < 128
this->min = (MIN_PULSE_WIDTH - min) / 4; //resolution of min/max is 4 uS
this->max = (MAX_PULSE_WIDTH - max) / 4;
@@ -160,4 +159,3 @@ void Servo::move(const int value) {
}
#endif // HAS_SERVOS
-
diff --git a/Marlin/src/HAL/servo.h b/Marlin/src/HAL/servo.h
index 7c521da0b589..5df396efd6fb 100644
--- a/Marlin/src/HAL/servo.h
+++ b/Marlin/src/HAL/servo.h
@@ -74,7 +74,8 @@
#elif defined(TARGET_LPC1768)
#include "HAL_LPC1768/LPC1768_Servo.h"
-
+#elif defined(STM32F4) || defined(STM32F4xx)
+ #include "HAL_STM32F4/HAL_Servo_STM32F4.h"
#else
#include
diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp
index 7648a1a7b3ea..5e46d86fdc34 100644
--- a/Marlin/src/Marlin.cpp
+++ b/Marlin/src/Marlin.cpp
@@ -95,10 +95,6 @@
#include "feature/I2CPositionEncoder.h"
#endif
-#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- #include "HAL/HAL_endstop_interrupts.h"
-#endif
-
#if HAS_TRINAMIC
#include "feature/tmc_util.h"
#endif
@@ -126,6 +122,10 @@
#include "feature/pause.h"
#endif
+#if ENABLED(POWER_LOSS_RECOVERY)
+ #include "feature/power_loss_recovery.h"
+#endif
+
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#include "feature/runout.h"
#endif
@@ -142,7 +142,7 @@
#include "feature/fanmux.h"
#endif
-#if (ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
+#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
#include "module/tool_change.h"
#endif
@@ -161,7 +161,7 @@ bool Running = true;
* Flags that the position is known in each linear axis. Set when homed.
* Cleared whenever a stepper powers off, potentially losing its position.
*/
-bool axis_homed[XYZ] = { false }, axis_known_position[XYZ] = { false };
+uint8_t axis_homed, axis_known_position; // = 0
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
TempUnit input_temp_units = TEMPUNIT_C;
@@ -200,10 +200,6 @@ millis_t max_inactive_time, // = 0
bool chdkActive; // = false;
#endif
-#if ENABLED(PID_EXTRUSION_SCALING)
- int lpq_len = 20;
-#endif
-
#if ENABLED(I2C_POSITION_ENCODERS)
I2CPositionEncodersMgr I2CPEM;
#endif
@@ -268,9 +264,14 @@ bool pin_is_protected(const pin_t pin) {
return false;
}
+void protected_pin_err() {
+ SERIAL_ERROR_START();
+ SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN);
+}
+
void quickstop_stepper() {
- stepper.quick_stop();
- stepper.synchronize();
+ planner.quick_stop();
+ planner.synchronize();
set_current_from_steppers_for_axis(ALL_AXES);
SYNC_PLAN_POSITION_KINEMATIC();
}
@@ -431,8 +432,16 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
&& !planner.has_blocks_queued()
) {
#if ENABLED(SWITCHING_EXTRUDER)
- const bool oldstatus = E0_ENABLE_READ;
- enable_E0();
+ bool oldstatus;
+ switch (active_extruder) {
+ default: oldstatus = E0_ENABLE_READ; enable_E0(); break;
+ #if E_STEPPERS > 1
+ case 2: case 3: oldstatus = E1_ENABLE_READ; enable_E1(); break;
+ #if E_STEPPERS > 2
+ case 4: oldstatus = E2_ENABLE_READ; enable_E2(); break;
+ #endif // E_STEPPERS > 2
+ #endif // E_STEPPERS > 1
+ }
#else // !SWITCHING_EXTRUDER
bool oldstatus;
switch (active_extruder) {
@@ -457,10 +466,19 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
current_position[E_AXIS] = olde;
planner.set_e_position_mm(olde);
- stepper.synchronize();
+ planner.synchronize();
+
#if ENABLED(SWITCHING_EXTRUDER)
- E0_ENABLE_WRITE(oldstatus);
- #else
+ switch (active_extruder) {
+ default: oldstatus = E0_ENABLE_WRITE(oldstatus); break;
+ #if E_STEPPERS > 1
+ case 2: case 3: oldstatus = E1_ENABLE_WRITE(oldstatus); break;
+ #if E_STEPPERS > 2
+ case 4: oldstatus = E2_ENABLE_WRITE(oldstatus); break;
+ #endif // E_STEPPERS > 2
+ #endif // E_STEPPERS > 1
+ }
+ #else // !SWITCHING_EXTRUDER
switch (active_extruder) {
case 0: E0_ENABLE_WRITE(oldstatus); break;
#if E_STEPPERS > 1
@@ -518,7 +536,7 @@ void idle(
) {
#if ENABLED(MAX7219_DEBUG)
Max7219_idle_tasks();
- #endif // MAX7219_DEBUG
+ #endif
lcd_update();
@@ -684,23 +702,27 @@ void setup() {
#if NUM_SERIAL > 0
uint32_t serial_connect_timeout = millis() + 1000UL;
- while(!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
+ while (!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#if NUM_SERIAL > 1
serial_connect_timeout = millis() + 1000UL;
- while(!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
+ while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#endif
#endif
SERIAL_PROTOCOLLNPGM("start");
SERIAL_ECHO_START();
- #if ENABLED(HAVE_TMC2130)
+ #if HAS_DRIVER(TMC2130)
tmc_init_cs_pins();
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAS_DRIVER(TMC2208)
tmc2208_serial_begin();
#endif
+ #ifdef BOARD_INIT
+ BOARD_INIT();
+ #endif
+
// Check startup - does nothing if bootloader sets MCUSR to 0
byte mcu = HAL_get_reset_source();
if (mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP);
@@ -748,7 +770,9 @@ void setup() {
print_job_timer.init(); // Initial setup of print job timer
- stepper.init(); // Initialize stepper, this enables interrupts!
+ endstops.init(); // Init endstops and pullups
+
+ stepper.init(); // Init stepper. This enables interrupts!
#if HAS_SERVOS
servo_init();
@@ -837,7 +861,7 @@ void setup() {
#endif
lcd_init();
- LCD_MESSAGEPGM(WELCOME_MSG);
+ lcd_reset_status();
#if ENABLED(SHOW_BOOTSCREEN)
lcd_bootscreen();
@@ -860,11 +884,7 @@ void setup() {
i2c.onRequest(i2c_on_request);
#endif
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- setup_endstop_interrupts();
- #endif
-
- #if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH
+ #if DO_SWITCH_EXTRUDER
move_extruder_servo(0); // Initialize extruder servo
#endif
@@ -876,6 +896,10 @@ void setup() {
pe_magnet_init();
#endif
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ check_print_job_recovery();
+ #endif
+
#if ENABLED(USE_WATCHDOG) // Reinit watchdog after HAL_get_reset_source call
watchdog_init();
#endif
@@ -886,21 +910,42 @@ void setup() {
*
* - Save or log commands to SD
* - Process available commands (if not saving)
- * - Call heater manager
- * - Call inactivity manager
* - Call endstop manager
- * - Call LCD update
+ * - Call inactivity manager
*/
void loop() {
- #if ENABLED(SDSUPPORT)
- card.checkautostart(false);
- #endif
-
for (;;) {
+
+ #if ENABLED(SDSUPPORT)
+ card.checkautostart();
+ #endif
+
+ #if ENABLED(SDSUPPORT) && ENABLED(ULTIPANEL)
+ if (abort_sd_printing) {
+ abort_sd_printing = false;
+ card.stopSDPrint(
+ #if SD_RESORT
+ true
+ #endif
+ );
+ clear_command_queue();
+ quickstop_stepper();
+ print_job_timer.stop();
+ thermalManager.disable_all_heaters();
+ #if FAN_COUNT > 0
+ for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
+ #endif
+ wait_for_heatup = false;
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ card.removeJobRecoveryFile();
+ #endif
+ }
+ #endif // SDSUPPORT && ULTIPANEL
+
if (commands_in_queue < BUFSIZE) get_available_commands();
advance_command_queue();
- endstops.report_state();
+ endstops.event_handler();
idle();
}
}
diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h
index 48f3ffede9f1..7c919f9e0377 100644
--- a/Marlin/src/Marlin.h
+++ b/Marlin/src/Marlin.h
@@ -44,10 +44,10 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
#if HAS_X2_ENABLE
#define enable_X() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0)
- #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
+ #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); }while(0)
#elif HAS_X_ENABLE
#define enable_X() X_ENABLE_WRITE( X_ENABLE_ON)
- #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
+ #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); }while(0)
#else
#define enable_X() NOOP
#define disable_X() NOOP
@@ -55,10 +55,10 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
#if HAS_Y2_ENABLE
#define enable_Y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0)
- #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
+ #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }while(0)
#elif HAS_Y_ENABLE
#define enable_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
- #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
+ #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }while(0)
#else
#define enable_Y() NOOP
#define disable_Y() NOOP
@@ -66,10 +66,10 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
#if HAS_Z2_ENABLE
#define enable_Z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0)
- #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
+ #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }while(0)
#elif HAS_Z_ENABLE
#define enable_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
- #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
+ #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }while(0)
#else
#define enable_Z() NOOP
#define disable_Z() NOOP
@@ -156,8 +156,6 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
/**
* The axis order in all axis related arrays is X, Y, Z, E
*/
-#define _AXIS(AXIS) AXIS ##_AXIS
-
void enable_all_steppers();
void disable_e_stepper(const uint8_t e);
void disable_e_steppers();
@@ -171,8 +169,12 @@ extern bool Running;
inline bool IsRunning() { return Running; }
inline bool IsStopped() { return !Running; }
-extern bool axis_known_position[XYZ];
-extern bool axis_homed[XYZ];
+extern uint8_t axis_homed, axis_known_position;
+
+constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS);
+FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
+FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
+
extern volatile bool wait_for_heatup;
#if HAS_RESUME_CONTINUE
@@ -183,11 +185,6 @@ extern volatile bool wait_for_heatup;
extern bool suspend_auto_report;
#endif
-#if ENABLED(AUTO_BED_LEVELING_UBL)
- typedef struct { double A, B, D; } linear_fit;
- linear_fit* lsf_linear_fit(double x[], double y[], double z[], const int);
-#endif
-
// Inactivity shutdown timer
extern millis_t max_inactive_time, stepper_inactive_time;
@@ -207,10 +204,6 @@ extern millis_t max_inactive_time, stepper_inactive_time;
extern uint8_t controllerFanSpeed;
#endif
-#if ENABLED(PID_EXTRUSION_SCALING)
- extern int lpq_len;
-#endif
-
#if HAS_POWER_SWITCH
extern bool powersupply_on;
#define PSU_PIN_ON() do{ OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE); powersupply_on = true; }while(0)
@@ -225,6 +218,7 @@ extern millis_t max_inactive_time, stepper_inactive_time;
#endif
bool pin_is_protected(const pin_t pin);
+void protected_pin_err();
#if HAS_SUICIDE
inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); }
diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h
index e21b580e3f67..104a797cb034 100644
--- a/Marlin/src/config/default/Configuration.h
+++ b/Marlin/src/config/default/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h
index 73c25edf30d2..42827a6eed4e 100644
--- a/Marlin/src/config/default/Configuration_adv.h
+++ b/Marlin/src/config/default/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
index 2f97787a681e..6afa4a76f1d8 100644
--- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
+++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 7
#define TEMP_SENSOR_1 0
@@ -466,15 +468,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -562,12 +569,29 @@
#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.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -636,15 +660,14 @@
#define DEFAULT_EJERK 10.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -696,6 +719,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -725,6 +749,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -768,10 +795,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -795,6 +822,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -833,9 +861,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -899,6 +924,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1077,8 +1106,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1090,6 +1119,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1363,11 +1397,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1395,19 +1428,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1434,6 +1454,15 @@
*/
//#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
//
@@ -1498,12 +1527,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1527,40 +1562,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1569,28 +1570,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1598,39 +1577,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1677,6 +1645,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1697,25 +1742,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1731,6 +1762,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1752,6 +1790,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1811,7 +1877,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
index dda086f023f2..57a17b091896 100644
--- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
+++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,4,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 4, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
index 98b9149a8cb9..0c5044e8ca8d 100644
--- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
+++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 800
@@ -536,18 +543,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#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 X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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 false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h
index db6b8479a17d..25530a465c7a 100644
--- a/Marlin/src/config/examples/Anet/A6/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A6/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,14 +310,14 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
-#define TEMP_SENSOR_0 5
+#define TEMP_SENSOR_0 11
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
-#define TEMP_SENSOR_BED 5
+#define TEMP_SENSOR_BED 11
#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -466,15 +468,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -556,18 +563,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -664,15 +711,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -724,6 +770,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -753,6 +800,9 @@
* readings with inductive probes and piezo sensors.
*/
#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -818,10 +868,10 @@
#define XY_PROBE_SPEED 8000
//#define XY_PROBE_SPEED 6000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 3)
// The number of probes to perform at each point.
@@ -846,10 +896,12 @@
#if 1 // 0 for less clearance
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#else
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 3 // Z position after probing is done
#endif
@@ -892,9 +944,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -993,6 +1042,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1195,8 +1248,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1208,6 +1261,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1495,11 +1553,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1527,19 +1584,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1566,6 +1610,15 @@
*/
//#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
//
@@ -1630,12 +1683,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1659,40 +1718,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1701,30 +1726,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1732,39 +1733,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1811,6 +1801,85 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
+//
+//#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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1831,25 +1900,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1865,6 +1920,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1886,6 +1948,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1945,7 +2035,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
index 2cfef537af8f..24b3ddb2087a 100644
--- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h
index fe142bb2a81c..243004e9ce4d 100644
--- a/Marlin/src/config/examples/Anet/A8/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A8/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -269,6 +269,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -278,6 +279,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -309,7 +311,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -453,15 +455,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 160 // 160 guards against false tripping when the extruder fan kicks on.
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -555,6 +562,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -623,15 +647,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -683,6 +706,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -712,6 +736,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -755,10 +782,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 6000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -782,6 +809,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -820,9 +848,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -886,6 +911,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -992,10 +1021,10 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION 15
- //#define RIGHT_PROBE_BED_POSITION 190
- //#define FRONT_PROBE_BED_POSITION 15
- //#define BACK_PROBE_BED_POSITION 170
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1018,17 +1047,6 @@
#endif
-#elif ENABLED(AUTO_BED_LEVELING_3POINT)
-
- // 3 arbitrary points to probe.
- // A simple cross-product is used to estimate the plane of the bed.
- #define PROBE_PT_1_X 20
- #define PROBE_PT_1_Y 160
- #define PROBE_PT_2_X 20
- #define PROBE_PT_2_Y 10
- #define PROBE_PT_3_X 180
- #define PROBE_PT_3_Y 10
-
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1066,17 +1084,17 @@
* Override if the automatically selected points are inadequate.
*/
#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
+ #define PROBE_PT_1_X 20
+ #define PROBE_PT_1_Y 160
+ #define PROBE_PT_2_X 20
+ #define PROBE_PT_2_Y 10
+ #define PROBE_PT_3_X 180
+ #define PROBE_PT_3_Y 10
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1088,6 +1106,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1361,11 +1384,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1393,19 +1415,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1432,6 +1441,15 @@
*/
//#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
//
@@ -1496,12 +1514,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1525,40 +1549,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1567,30 +1557,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1598,39 +1564,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1677,6 +1632,85 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h
+//
+//#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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1697,25 +1731,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1731,6 +1751,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1752,6 +1779,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1811,7 +1866,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
index c5505b52f6e0..afc683101513 100644
--- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
index 88524909dfed..0a6c03a48d33 100644
--- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
+++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 1
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,13 +1400,12 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
-#define LCD_LANGUAGE ru
+#define LCD_LANGUAGE en
/**
* LCD Character Set
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 CYRILLIC
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1513,12 +1571,6 @@
//
//#define MAKRPANEL
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
//
// Activate one of these if you have a Panucatt Devices
// Viki 2.0 or mini Viki with Graphic LCD
@@ -1533,14 +1585,6 @@
//
//#define ELB_FULL_GRAPHIC_CONTROLLER
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1593,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1600,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1668,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1765,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1785,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1813,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1900,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
index 73c25edf30d2..42827a6eed4e 100644
--- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
+++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
index c9d9e3a8146f..791202ee1e3a 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
//#define PREVENT_COLD_EXTRUSION
//#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -536,18 +543,35 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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 endstop.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 9000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 10 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +904,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*/
//#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
//
@@ -1478,12 +1507,18 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
index 876c65115d58..05727fcc91c1 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
index ab8ee1344e96..c6625526b798 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 5
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -536,18 +543,35 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
-const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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 endstop.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 10 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +904,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
*/
//#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
//
@@ -1478,12 +1507,18 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
index 3ab4e3ad04cd..840e7fb76748 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
index 1e4cfe38c655..8aaeee32f4a8 100644
--- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
+++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -434,15 +436,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -536,6 +543,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -604,15 +628,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -664,6 +687,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -693,6 +717,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -736,10 +763,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -763,6 +790,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -801,9 +829,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -867,6 +892,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1045,8 +1074,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1058,6 +1087,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1331,11 +1365,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1363,19 +1396,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1402,6 +1422,15 @@
*/
//#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
//
@@ -1466,12 +1495,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1495,40 +1530,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1537,28 +1538,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1566,39 +1545,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1645,6 +1613,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1665,25 +1710,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1699,6 +1730,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1720,6 +1758,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1779,7 +1845,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
index d4b91e781c4f..3592978455f0 100644
--- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
index 2fc4df580ee3..be28e9ee6b13 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
@@ -95,7 +95,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -122,7 +122,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -276,6 +276,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -285,6 +286,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -316,7 +318,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 70
#define TEMP_SENSOR_1 0
@@ -341,7 +343,7 @@
#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
// Bed temperature must be close to target for this long before M190 returns success
-#define TEMP_BED_RESIDENCY_TIME 0 // (seconds)
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
@@ -358,12 +360,12 @@
// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
-#define HEATER_0_MAXTEMP 275
+#define HEATER_0_MAXTEMP 230
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
#define HEATER_4_MAXTEMP 275
-#define BED_MAXTEMP 110
+#define BED_MAXTEMP 100
//===========================================================================
//============================= PID Settings ================================
@@ -382,13 +384,13 @@
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with gcode: M301 E[extruder number, 0-2]
- #define PID_FUNCTIONAL_RANGE 50 // If the temperature difference between the target temperature and the actual temperature
- // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+ #define PID_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.
// Tuned PID values using M303
- #define DEFAULT_Kp 19.18
- #define DEFAULT_Ki 1.36
- #define DEFAULT_Kd 67.42
+ #define DEFAULT_Kp 23.75
+ #define DEFAULT_Ki 2.12
+ #define DEFAULT_Kd 66.63
// BQ firmware stock PID values
//#define DEFAULT_Kp 10.7
@@ -447,15 +449,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -545,10 +552,50 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -574,14 +621,14 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 210.02 }
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 218.77 }
/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_MAX_FEEDRATE { 167, 167, 3.3, 167 }
+#define DEFAULT_MAX_FEEDRATE { 300, 300, 3, 120 }
/**
* Default Max Acceleration (change/s) change = mm/s
@@ -589,7 +636,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 3000 }
+#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 3000 }
/**
* Default Acceleration (change/s) change = mm/s
@@ -599,9 +646,9 @@
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
-#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves
-#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
-#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves
+#define DEFAULT_ACCELERATION 900 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 1300 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 1500 // X, Y, Z acceleration for travel (non printing) moves
/**
* Default Jerk (mm/s)
@@ -611,21 +658,20 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
-#define DEFAULT_XJERK 10.0
-#define DEFAULT_YJERK 10.0
+#define DEFAULT_XJERK 5.0
+#define DEFAULT_YJERK 5.0
#define DEFAULT_ZJERK 0.3
-#define DEFAULT_EJERK 1.0
+#define DEFAULT_EJERK 10.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -677,6 +723,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -706,6 +753,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -741,7 +791,7 @@
*/
#define X_PROBE_OFFSET_FROM_EXTRUDER 34 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 15 // Y offset: -front +behind [the nozzle]
-#define Z_PROBE_OFFSET_FROM_EXTRUDER -4 // Z offset: -below +above [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 10
@@ -749,10 +799,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -776,16 +826,17 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 0 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points
-//#define Z_AFTER_PROBING 2 // Z position after probing is done
+#define Z_CLEARANCE_MULTI_PROBE 5 // 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
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
-#define Z_PROBE_OFFSET_RANGE_MIN -5.5
-#define Z_PROBE_OFFSET_RANGE_MAX -3
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
// Enable the M48 repeatability test to test probe accuracy
-#define Z_MIN_PROBE_REPEATABILITY_TEST
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{ 0:'Low', 1:'High' }
@@ -814,9 +865,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -828,11 +876,11 @@
// @section homing
-//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+#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 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+//#define Z_HOMING_HEIGHT 3 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case.
// Direction of endstops when homing; 1=MAX, -1=MIN
@@ -880,6 +928,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -893,7 +945,6 @@
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
- //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
@@ -973,8 +1024,8 @@
#if ENABLED(G26_MESH_VALIDATION)
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
- #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
- #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 185.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 50.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif
#endif
@@ -982,8 +1033,8 @@
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
- #define GRID_MAX_POINTS_X 3
- #define GRID_MAX_POINTS_Y 4
+ #define GRID_MAX_POINTS_X 5
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
//#define LEFT_PROBE_BED_POSITION X_MIN_POS + (X_PROBE_OFFSET_FROM_EXTRUDER)
@@ -998,7 +1049,7 @@
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
- //#define EXTRAPOLATE_BEYOND_GRID
+ #define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
@@ -1012,17 +1063,6 @@
#endif
-#elif ENABLED(AUTO_BED_LEVELING_3POINT)
-
- // 3 arbitrary points to probe.
- // A simple cross-product is used to estimate the plane of the bed.
- #define PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
- #define PROBE_PT_1_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
- #define PROBE_PT_2_X X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
- #define PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
- #define PROBE_PT_3_X ((X_MIN_POS + X_MAX_POS) / 2)
- #define PROBE_PT_3_Y Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
-
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1069,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1082,11 +1122,16 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+#define Z_PROBE_END_SCRIPT "G27 P0"
// @section homing
@@ -1117,8 +1162,8 @@
#endif
// Homing speeds (mm/m)
-#define HOMING_FEEDRATE_XY (60*60)
-#define HOMING_FEEDRATE_Z 120
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z ( 4*60)
// @section calibrate
@@ -1202,7 +1247,7 @@
// every couple of seconds when it can't accept commands.
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
-#define DEFAULT_KEEPALIVE_INTERVAL 10 // Number of seconds between "busy" messages. Set with M113.
+#define DEFAULT_KEEPALIVE_INTERVAL 5 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
//
@@ -1223,12 +1268,12 @@
// @section temperature
// Preheat Constants
-#define PREHEAT_1_TEMP_HOTEND 205
+#define PREHEAT_1_TEMP_HOTEND 180
#define PREHEAT_1_TEMP_BED 50
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
-#define PREHEAT_2_TEMP_HOTEND 245
-#define PREHEAT_2_TEMP_BED 50
+#define PREHEAT_2_TEMP_HOTEND 210
+#define PREHEAT_2_TEMP_BED 60
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
/**
@@ -1289,7 +1334,7 @@
* Attention: EXPERIMENTAL. G-code arguments may change.
*
*/
-#define NOZZLE_CLEAN_FEATURE
+//#define NOZZLE_CLEAN_FEATURE
#if ENABLED(NOZZLE_CLEAN_FEATURE)
// Default number of pattern repetitions
@@ -1299,8 +1344,8 @@
#define NOZZLE_CLEAN_TRIANGLES 3
// Specify positions as { X, Y, Z }
- #define NOZZLE_CLEAN_START_POINT { X_MIN_POS + 10, Y_MAX_POS - 9, (Z_MIN_POS + 0.5)}
- #define NOZZLE_CLEAN_END_POINT { X_MIN_POS + 90, Y_MAX_POS - 0, (Z_MIN_POS + 0.5)}
+ #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
@@ -1310,7 +1355,7 @@
#define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
// Moves the nozzle to the initial position
- //#define NOZZLE_CLEAN_GOBACK
+ #define NOZZLE_CLEAN_GOBACK
#endif
/**
@@ -1355,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1387,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1424,7 +1455,16 @@
*
* Use CRC checks and retries on the SD communication.
*/
-#define SD_CHECK_AND_RETRY
+//#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
@@ -1432,13 +1472,13 @@
// 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
+#define ENCODER_PULSES_PER_STEP 1
//
// 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
+#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
* Encoder Direction Options
@@ -1490,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1519,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1561,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1590,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1669,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1689,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1723,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1744,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1751,7 +1828,7 @@
// @section extras
// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
-//#define FAST_PWM_FAN
+#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
@@ -1803,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
index ebc53c35cc82..d5f94fb7ba65 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
@@ -172,20 +172,22 @@
// Extruder runout prevention.
// If the machine is idle and the temperature over MINTEMP
// then extrude some filament every couple of SECONDS.
-#define EXTRUDER_RUNOUT_PREVENT
+//#define EXTRUDER_RUNOUT_PREVENT
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
- #define EXTRUDER_RUNOUT_MINTEMP 170
- #define EXTRUDER_RUNOUT_SECONDS 60
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
#define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
#define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
#endif
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -204,12 +206,22 @@
// When first starting the main fan, run it at full speed for the
// given number of milliseconds. This gets the fan spinning reliably
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
-//#define FAN_KICKSTART_TIME 100
+#define FAN_KICKSTART_TIME 800
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -367,7 +379,7 @@
// Homing hits each endstop, retracts by these distances, then does a slower bump.
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
-#define Z_HOME_BUMP_MM 2
+#define Z_HOME_BUMP_MM 1
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
@@ -393,10 +405,10 @@
// Default stepper release if idle. Set to 0 to deactivate.
// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
// Time can be set by M18 and M84.
-#define DEFAULT_STEPPER_DEACTIVE_TIME 120
-#define DISABLE_INACTIVE_X true
-#define DISABLE_INACTIVE_Y true
-#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 300
+#define DISABLE_INACTIVE_X false
+#define DISABLE_INACTIVE_Y false
+#define DISABLE_INACTIVE_Z false // set to false if the nozzle will fall down on your printed part when print has finished.
#define DISABLE_INACTIVE_E true
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
@@ -407,7 +419,7 @@
// @section lcd
#if ENABLED(ULTIPANEL)
- #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // Feedrates for manual moves along X, Y, Z, E from panel
//#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -453,7 +481,15 @@
* M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
*/
//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
-#define DIGIPOT_MOTOR_CURRENT { 150, 170, 180, 190, 180 } // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A])
+
+#define DIGIPOT_MOTOR_CURRENT { 170, 170, 180, 190, 180 } // Values 0-255
+ //
+ // bq ZUM Mega 3D defaults:
+ // X = 150 [~1.17A]
+ // Y = 170 [~1.33A]
+ // Z = 180 [~1.41A]
+ // E0 = 190 [~1.49A]
+
//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
@@ -472,7 +508,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -481,20 +517,17 @@
//=============================Additional Features===========================
//===========================================================================
-//#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
-//#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
-//#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
+#define ENCODER_10X_STEPS_PER_SEC 30 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
+#define ENCODER_100X_STEPS_PER_SEC 50 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
-//#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
// @section lcd
// Include a page of printer information in the LCD Main Menu
-#define LCD_INFO_MENU
-
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
+//#define LCD_INFO_MENU
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -503,7 +536,7 @@
#define LCD_DECIMAL_SMALL_XY
// The timeout (in ms) to return to the status screen from sub-menus
-//#define LCD_TIMEOUT_TO_STATUS 15000
+#define LCD_TIMEOUT_TO_STATUS 60000
// Add an 'M73' G-code to set the current percentage
//#define LCD_SET_PROGRESS_MANUALLY
@@ -545,8 +578,8 @@
// Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
#define SD_DETECT_INVERTED
- #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
- #define SD_FINISHED_RELEASECOMMAND "M104 S0\nM84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+ #define SD_FINISHED_STEPPERRELEASE false // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "G27 P0" // You might want to keep the z enabled so your bed stays in place.
// Reverse SD sort to show "more recent" files first, according to the card's FAT.
// Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
@@ -555,6 +588,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -594,7 +641,7 @@
#endif
// This allows hosts to request long names for files and folders with M33
- #define LONG_FILENAME_HOST_SUPPORT
+ //#define LONG_FILENAME_HOST_SUPPORT
// Enable this option to scroll long filenames in the SD card menu
//#define SCROLL_LONG_FILENAMES
@@ -637,18 +684,18 @@
//#define DOGM_SD_PERCENT
// Enable to save many cycles by drawing a hollow frame on the Info Screen
- #define XYZ_HOLLOW_FRAME
+ //#define XYZ_HOLLOW_FRAME
// Enable to save many cycles by drawing a hollow frame on Menu Screens
#define MENU_HOLLOW_FRAME
// A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
- #define USE_BIG_EDIT_FONT
+ //#define USE_BIG_EDIT_FONT
// A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
- #define USE_SMALL_INFOFONT
+ //#define USE_SMALL_INFOFONT
// Enable this option and reduce the value to optimize screen updates.
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
@@ -700,16 +747,16 @@
*
* Warning: Does not respect endstops!
*/
-//#define BABYSTEPPING
+#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
- //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
- #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
- #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
- //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
- //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
- #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
- // Note: Extra time may be added to mitigate controller latency.
- //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 2 // Babysteps are very small. Increase for faster motion.
+ //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #define DOUBLECLICK_MAX_INTERVAL 1500 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#endif
// @section extruder
@@ -746,12 +793,36 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
// G2/G3 Arc Support
//
-#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+//#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
#if ENABLED(ARC_SUPPORT)
#define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
#define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
@@ -772,10 +843,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -791,7 +898,7 @@
// The number of linear motions that can be in the plan at any give time.
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
#if ENABLED(SDSUPPORT)
- #define BLOCK_BUFFER_SIZE 32 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+ #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else
#define BLOCK_BUFFER_SIZE 64 // maximize block buffer
#endif
@@ -837,13 +944,13 @@
// enter the serial receive buffer, so they cannot be blocked.
// Currently handles M108, M112, M410
// Does not work on boards using AT90USB (USBCON) processors!
-#define EMERGENCY_PARSER
+//#define EMERGENCY_PARSER
// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients abort after 30 seconds in a timeout.
// Some other clients start sending commands while receiving a 'wait'.
// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
-//#define NO_TIMEOUTS 1000 // Milliseconds
+#define NO_TIMEOUTS 1000 // Milliseconds
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
#define ADVANCED_OK
@@ -900,61 +1007,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1101,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1271,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1329,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1635,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1676,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/README.md b/Marlin/src/config/examples/BQ/Hephestos_2/README.md
index cbe9965eed70..ab28487e2d9d 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/README.md
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/README.md
@@ -1,22 +1,29 @@
# Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2)
-This configuration file is based on the original configuration file shipped with the heavily modified Marlin fork by BQ. The original firmware and configuration file can be found at [BQ Github repository](https://github.com/bq/Marlin).
+Based on the original configuration file shipped with the heavily modified Marlin fork by BQ.
+The forked firmware and configuration files can be found at the [BQ Github repository](https://github.com/bq/Marlin).
-NOTE: The look and feel of the Hephestos 2 while navigating the LCD menu will change by using the original Marlin firmware.
+NOTE: The look and feel of the LCD menu will change dramatically when using the original Marlin firmware.
## Changelog
- * 2016/03/01 - Initial release
+ * 2018/05/30 - Configuration updated to the latest Marlin version (43a55a9af).
+ ABL Bilinear 5x5 is active by default.
- * 2016/03/21 - Activated 4-point auto leveling by default
- Updated miscellaneous z-probe values
+ * 2017/07/06 - Configuration updated to the latest Marlin version and added support for the
+ official BQ heated bed upgrade kit.
- * 2016/06/21 - Disabled hot bed related options
- Activated software endstops
- SD printing now disables the heater when finished
+ * 2016/12/13 - Configuration updated to the latest Marlin version.
- * 2016/07/13 - Update the `DEFAULT_AXIS_STEPS_PER_UNIT` for the Z axis
- Increased the `DEFAULT_XYJERK`
+ * 2016/07/13 - Configuration updated to the latest Marlin version.
- * 2016/12/13 - Configuration updated.
+ * 2016/06/21 - Disabled heated bed related options, activated software endstops and SD printing now
+ disables the heater when finishes printing.
- * 2017/07/06 - Configuration updated to the latest Marlin version.
- Added support for the official BQ heated bed kit.
+ * 2016/03/21 - Activated 4-point auto leveling by default and updated miscellaneous z-probe values.
+
+ * 2016/03/01 - The first release of Marlin's configuration file for the
+ BQ Hephestos 2 3D printer.
+
+
+## Support
+This configuration should work easily with the stock Hephestos 2, nevertheless if you encounter any
+issues you may contact me on [Github](https://github.com/jbrazio), [Twitter](https://twitter.com/jbrazio) or by mail.
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h b/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h
index 3ba0129ea90a..0e771c0c7f7b 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h
@@ -30,38 +30,39 @@
* http://marlinfw.org/tools/u8glib/converter.html
*/
-#define CUSTOM_BOOTSCREEN_BMPWIDTH 62
+#define CUSTOM_BOOTSCREEN_BMPWIDTH 64
const unsigned char custom_start_bmp[] PROGMEM = {
- B00000000,B00000000,B00000000,B00001111,B11110000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00011111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00011111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00011111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00011111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00011111,B11111000,B00000000,B00000000,B00000000,
- B00000000,B00000011,B11000000,B00001111,B11110000,B00000111,B10000000,B00000000,
- B00000000,B00000111,B11100000,B00000111,B11100000,B00001111,B11000000,B00000000,
- B00000000,B00001111,B11110000,B00000011,B11000000,B00011111,B11100000,B00000000,
- B00000000,B00011111,B11111000,B00000000,B00000000,B00111111,B11110000,B00000000,
- B00000000,B00011111,B11111000,B00000000,B00000000,B00111111,B11110000,B00000000,
- B00000000,B00011111,B11111000,B00000000,B00000000,B00111111,B11110000,B00000000,
- B00000000,B00011111,B11111000,B00000000,B00000000,B00111111,B11110000,B00000000,
- B00000000,B00011111,B11111000,B00000000,B00000000,B00111111,B11110000,B00000000,
- B00000000,B00001111,B11110000,B00000000,B00000000,B00011111,B11100000,B00000000,
- B00000000,B00000111,B11100000,B00000000,B00000000,B00001111,B11000000,B00000000,
- B00000000,B00000011,B11000000,B00000000,B00000000,B00000111,B10000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000011,B11110000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00001111,B11111100,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00001111,B11111100,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B11111000,B00000111,B11111000,B00000111,B11000000,B00000000,
+ B00000000,B00000001,B11111100,B00000011,B11110000,B00001111,B11100000,B00000000,
+ B00000000,B00000011,B11111110,B00000000,B11000000,B00011111,B11110000,B00000000,
+ B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
+ B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
+ B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
+ B00000000,B00000011,B11111100,B00000000,B00000000,B00001111,B11100000,B00000000,
+ B00000000,B00000001,B11111000,B00000000,B00000000,B00001111,B11100000,B00000000,
+ B00000000,B00000000,B01110000,B00000000,B00000000,B00000011,B10000000,B00000000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
@@ -69,32 +70,31 @@ const unsigned char custom_start_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
+ B00001111,B10000000,B00000000,B00000000,B01110000,B00000000,B00000000,B00000000,
+ B00011111,B11000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
+ B00111111,B11000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
+ B00111111,B11100000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
+ B00111111,B11100000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
+ B00111111,B11100000,B00000000,B00000000,B01111011,B11000000,B00001111,B00000000,
+ B00111111,B11000000,B00000000,B00000000,B01111111,B11110000,B00111111,B11000000,
+ B00011111,B10000000,B00000000,B00000000,B01111111,B11111000,B01111111,B11100000,
+ B00001111,B00000000,B00000000,B00000000,B01111110,B11111100,B11111001,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B11100000,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B11100000,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B01111100,B01111100,B11111001,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00011111,B11111000,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00001111,B11110000,B01111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000111,B11100000,B00011111,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00011110,B00000000,B00000000,B00000000,B11110000,B00000000,B00000000,B00000000,
- B00111111,B00000000,B00000000,B00000000,B11110000,B00000000,B00000000,B00000000,
- B01111111,B10000000,B00000000,B00000000,B11110000,B00000000,B00000000,B00000000,
- B11111111,B11000000,B00000000,B00000000,B11110000,B00000000,B00000000,B00000000,
- B11111111,B11000000,B00000000,B00000000,B11110000,B00000000,B00000000,B00000000,
- B11111111,B11000000,B00000000,B00000000,B11110000,B00000000,B00000000,B00000000,
- B11111111,B11000000,B00000000,B00000000,B11110111,B11000000,B00011111,B10000000,
- B11111111,B11000000,B00000000,B00000000,B11111111,B11110000,B01111111,B11000000,
- B01111111,B10000000,B00000000,B00000000,B11111111,B11111000,B11111111,B11100000,
- B00111111,B00000000,B00000000,B00000000,B11111100,B11111000,B11110000,B11111000,
- B00011110,B00000000,B00000000,B00000000,B11111000,B01111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11110000,B00111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11110000,B00111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11110000,B00111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11110000,B00111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11110000,B00111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11110000,B00111101,B11100000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B11111000,B01111001,B11110000,B11111000,
- B00000000,B00000000,B00000000,B00000000,B11111111,B11111000,B11111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B01111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00001111,B11100000,B00111111,B11111000,
- B00000000,B00000000,B00000000,B00000000,B00000011,B10000000,B00001110,B01111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
};
diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
index d1638c8e12ef..a737bdf75c80 100644
--- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
+++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -434,15 +436,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -536,6 +543,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -604,15 +628,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -664,6 +687,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -693,6 +717,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -736,10 +763,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -763,6 +790,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -801,9 +829,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -867,6 +892,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1045,8 +1074,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1058,6 +1087,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1331,11 +1365,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1363,19 +1396,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1402,6 +1422,15 @@
*/
//#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
//
@@ -1466,12 +1495,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1495,40 +1530,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1537,28 +1538,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1566,39 +1545,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1645,6 +1613,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1665,25 +1710,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1699,6 +1730,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1720,6 +1758,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1779,7 +1845,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
index d4b91e781c4f..3592978455f0 100644
--- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h
index 0ee435c57f8f..699921218727 100644
--- a/Marlin/src/config/examples/Cartesio/Configuration.h
+++ b/Marlin/src/config/examples/Cartesio/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -269,6 +269,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -278,6 +279,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -309,7 +311,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 -1
#define TEMP_SENSOR_1 -1
@@ -445,15 +447,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -541,12 +548,29 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -615,15 +639,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -675,6 +698,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -704,6 +728,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -747,10 +774,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -774,6 +801,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -812,9 +840,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -878,6 +903,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1056,8 +1085,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1069,6 +1098,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1342,11 +1376,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1374,19 +1407,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1413,6 +1433,15 @@
*/
//#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
//
@@ -1477,12 +1506,18 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
#define LCD_FEEDBACK_FREQUENCY_HZ 1000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1506,40 +1541,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1548,28 +1549,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-#define REPRAPWORLD_KEYPAD
-#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1577,39 +1556,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1656,6 +1624,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1676,25 +1721,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1710,6 +1741,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1731,6 +1769,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+#define REPRAPWORLD_KEYPAD
+#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1790,7 +1856,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h
index ddefdc979322..be9c6033db04 100644
--- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h
+++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 3.0
-#define TEMP_SENSOR_AD595_GAIN 2.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 1 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- //#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 1 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ //#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h
index e3d870de7451..23b40f86afd8 100755
--- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 1000
@@ -554,10 +561,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -626,15 +673,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -686,6 +732,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -715,6 +762,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -758,10 +808,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -785,6 +835,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 10 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -823,9 +874,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -889,6 +937,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1067,8 +1119,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1080,6 +1132,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1353,11 +1410,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1385,19 +1441,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1424,6 +1467,15 @@
*/
//#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
//
@@ -1488,12 +1540,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1517,40 +1575,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1559,28 +1583,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1588,39 +1590,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1667,6 +1658,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1687,25 +1755,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1721,6 +1775,13 @@
//
#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1742,6 +1803,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1801,7 +1890,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
index c63eed831836..f2ada46ae439 100755
--- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1583,27 +1630,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1621,4 +1671,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
index 0718b250d3a1..7a4e7505de21 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -134,6 +134,10 @@
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_RAMPS_14_EFB
+ #define PIN_EXP1 65 // A11
+ #define PIN_EXP2 66 // A12
+ #define PIN_EXP3 11 // SERVO0_PIN
+ #define PIN_EXP4 12 // PS_ON_PIN
#endif
// Optional custom name for your RepStrap or other custom machine
@@ -268,6 +272,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +282,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +314,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +452,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 435
@@ -544,10 +555,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +667,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +726,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +756,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +802,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +829,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +868,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +931,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1058,8 +1114,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
#define LCD_BED_LEVELING
@@ -1071,6 +1127,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1344,11 +1405,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1376,19 +1436,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1415,6 +1462,15 @@
*/
//#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
//
@@ -1479,12 +1535,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1508,40 +1570,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1550,28 +1578,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1579,39 +1585,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1658,6 +1653,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1678,25 +1750,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1712,6 +1770,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1733,6 +1798,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1792,7 +1885,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
index e4d1446af1fc..c9b808e6bcf4 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,60 +999,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 430 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 41 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 430 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 20 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 430 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 41 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 430 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 20 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -999,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1202,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1273,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1579,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1617,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h b/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h
index c956a55a710f..30264c6defe6 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h
@@ -36,7 +36,10 @@
#define STATUS_SCREEN_BED_TEXT_X (HOTENDS > 1 ? 81 : 73)
-#define FAN_ANIM_FRAMES 3
+// Can also be overridden in Configuration.h
+#ifndef FAN_ANIM_FRAMES
+ #define FAN_ANIM_FRAMES 3
+#endif
#define STATUS_SCREEN_FAN_TEXT_X (FAN_ANIM_FRAMES == 3 ? 103 : 105)
#define STATUS_SCREEN_FAN_TEXT_Y (FAN_ANIM_FRAMES > 2 ? 28 : 27)
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
index 3e1264e483c2..475fdaef9f88 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
@@ -96,7 +96,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -123,7 +123,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -277,6 +277,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -286,6 +287,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -317,7 +319,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -465,15 +467,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 1000
@@ -563,10 +570,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -635,15 +682,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -695,6 +741,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -724,6 +771,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -767,10 +817,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -794,6 +844,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -832,9 +883,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -898,6 +946,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1076,8 +1128,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1089,6 +1141,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1362,11 +1419,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1394,19 +1450,6 @@
*/
#define DISPLAY_CHARSET_HD44780 WESTERN
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1433,6 +1476,15 @@
*/
//#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
//
@@ -1497,12 +1549,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1526,40 +1584,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1568,28 +1592,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1597,39 +1599,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1676,6 +1667,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1696,25 +1764,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1730,6 +1784,13 @@
//
#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1751,6 +1812,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1810,7 +1899,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
index 18efa670302c..ab87a5e5bf2c 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 420 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 8 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 120 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h
index 60a77c0a9d55..080a8ef80489 100644
--- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 190
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 500
@@ -554,10 +561,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -626,15 +673,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -686,6 +732,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -715,6 +762,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -758,10 +808,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -785,6 +835,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -823,9 +874,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -889,6 +937,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1067,8 +1119,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
#define LCD_BED_LEVELING
@@ -1080,6 +1132,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1353,11 +1410,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1385,19 +1441,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1424,6 +1467,15 @@
*/
//#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
//
@@ -1488,12 +1540,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1517,40 +1575,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1559,28 +1583,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1588,39 +1590,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1667,6 +1658,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1687,25 +1755,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1721,6 +1775,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1742,6 +1803,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1801,7 +1890,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
index 6423ce0e5c37..e8a56d519aa2 100644
--- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,60 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -999,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1202,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1273,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1579,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1617,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
index d2e42decf6b8..f6d246a53b56 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -450,15 +452,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -548,10 +555,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -620,15 +667,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -680,6 +726,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -709,6 +756,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -752,10 +802,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -779,6 +829,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -817,9 +868,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -847,8 +895,8 @@
// @section machine
// The size of the print bed
-#define X_BED_SIZE 320
-#define Y_BED_SIZE 320
+#define X_BED_SIZE 150
+#define Y_BED_SIZE 150
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
@@ -856,7 +904,7 @@
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
-#define Z_MAX_POS 420
+#define Z_MAX_POS 200
/**
* Software Endstops
@@ -883,6 +931,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1061,8 +1113,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1074,6 +1126,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1347,11 +1404,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1379,19 +1435,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1418,6 +1461,15 @@
*/
//#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
//
@@ -1482,12 +1534,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1511,40 +1569,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1553,28 +1577,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1582,39 +1584,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1661,6 +1652,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1681,25 +1749,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1715,6 +1769,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1736,6 +1797,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1795,7 +1884,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
index 15b10fbac44b..feca0632133e 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
new file mode 100644
index 000000000000..d963848db846
--- /dev/null
+++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
@@ -0,0 +1,1957 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#ifndef CONFIGURATION_H
+#define CONFIGURATION_H
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// 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
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(thisiskeithb, Ender-3)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * 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.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 115200
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_MELZI_CREALITY
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Ender-3"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
+#endif
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+#if ENABLED(PARKING_EXTRUDER)
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds a new code, M165, to set the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define BED_MAXTEMP 125
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+ // Creality Ender-3
+ #define DEFAULT_Kp 21.73
+ #define DEFAULT_Ki 1.54
+ #define DEFAULT_Kd 76.55
+
+ // Ultimaker
+ //#define DEFAULT_Kp 22.2
+ //#define DEFAULT_Ki 1.08
+ //#define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * heater. If your configuration is significantly different than this and you don't understand
+ * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ */
+//#define PIDTEMPBED
+
+//#define BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * 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! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 200
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= Mechanical Settings =========================
+//===========================================================================
+
+// @section machine
+
+// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
+// either in the usual order or reversed
+//#define COREXY
+//#define COREXZ
+//#define COREYZ
+//#define COREYX
+//#define COREZX
+//#define COREZY
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// 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).
+#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * Default Axis Steps Per Unit (steps/mm)
+ * Override with M92
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 93 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 }
+
+/**
+ * Default Max Acceleration (change/s) change = mm/s
+ * (Maximum start speed for accelerated moves)
+ * Override with M201
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 5000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#define DEFAULT_XJERK 10.0
+#define DEFAULT_YJERK 10.0
+#define DEFAULT_ZJERK 0.3
+#define DEFAULT_EJERK 5.0
+
+/**
+ * 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 =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#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.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // 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
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER false // Keep only the active extruder enabled.
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR true
+#define INVERT_Y_DIR true
+#define INVERT_Z_DIR false
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR true
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 220
+#define Y_BED_SIZE 220
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS 0
+#define Y_MIN_POS 0
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 250
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * 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 MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// Manually set the home position. Leave these undefined for automatic settings.
+// For DELTA this is the top-center of the Cartesian print volume.
+//#define MANUAL_X_HOME_POS 0
+//#define MANUAL_Y_HOME_POS 0
+//#define MANUAL_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_TEMP_HOTEND 185
+#define PREHEAT_1_TEMP_BED 45
+#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255
+
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 0
+#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * P1 Raise the nozzle always to Z-park height.
+ * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
+ */
+//#define NOZZLE_PARK_FEATURE
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 WESTERN
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * 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.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://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.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// 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/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// 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: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a 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 ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#endif // CONFIGURATION_H
diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
new file mode 100644
index 000000000000..48b166eac7ea
--- /dev/null
+++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
@@ -0,0 +1,1683 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#ifndef CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// When first starting the main fan, run it at full speed for the
+// given number of milliseconds. This gets the fan spinning reliably
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
+//#define FAN_KICKSTART_TIME 100
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * Multiple extruders can be assigned to the same pin in which case
+ * the fan will turn on when any selected extruder is above the threshold.
+ */
+#define E0_AUTO_FAN_PIN -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
+ #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
+ #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
+ #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
+ //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
+ //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
+ #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+// Enable this for dual x-carriage printers.
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ // Configuration for second X-carriage
+ // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
+ // the second x-carriage always homes to the maximum endstop.
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+
+ // There are a few selectable movement modes for dual x-carriages using M605 S
+ // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ // as long as it supports dual x-carriages. (M605 S0)
+ // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ // that additional slicer support is not required. (M605 S1)
+ // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+
+ // Default settings in "Auto-park Mode"
+ #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
+ #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 0} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
+#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
+#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+
+//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
+
+// @section lcd
+
+// Include a page of printer information in the LCD Main Menu
+#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ #define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if ENABLED(DOGLCD)
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ #if ENABLED(U8GLIB_ST7920)
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+#endif // DOGLCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+ //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
+ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
+ * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ */
+//#define LIN_ADVANCE
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// The number of linear motions that can be in the plan at any give time.
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
+#if ENABLED(SDSUPPORT)
+ #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// @section extras
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT // ONLY PARTIALLY TESTED
+#if ENABLED(FWRETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZLIFT 0 // Default retract Z-lift
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+#endif
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+//#define ADVANCED_PAUSE_FEATURE
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #define X_MAX_CURRENT 1000 // in mA
+ #define X_SENSE_RESISTOR 91 // in mOhms
+ #define X_MICROSTEPS 16 // number of microsteps
+
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
+ * the hardware SPI interface on your board and define the required CS pins
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
+ * to PDN_UART without a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
+ */
+#if HAS_TRINAMIC
+
+ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
+ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
+ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
+
+ #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+
+ /**
+ * Use software SPI for TMC2130.
+ * The default SW SPI pins are defined the respective pins files,
+ * but you can override or define them here.
+ */
+ //#define TMC_USE_SW_SPI
+ //#define TMC_SW_MOSI -1
+ //#define TMC_SW_MISO -1
+ //#define TMC_SW_SCK -1
+
+ /**
+ * Use Trinamic's ultra quiet stepping mode.
+ * When disabled, Marlin will use spreadCycle stepping mode.
+ */
+ #define STEALTHCHOP
+
+ /**
+ * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * like overtemperature and short to ground. TMC2208 requires hardware serial.
+ * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * M911 - Report stepper driver overtemperature pre-warn condition.
+ * M912 - Clear stepper driver overtemperature pre-warn condition flag.
+ * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
+ */
+ //#define MONITOR_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_DRIVER_STATUS)
+ #define CURRENT_STEP_DOWN 50 // [mA]
+ #define REPORT_CURRENT_CHANGE
+ #define STOP_ON_ERROR
+ #endif
+
+ /**
+ * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
+ * This mode allows for faster movements at the expense of higher noise levels.
+ * STEALTHCHOP needs to be enabled.
+ * M913 X/Y/Z/E to live tune the setting
+ */
+ //#define HYBRID_THRESHOLD
+
+ #define X_HYBRID_THRESHOLD 100 // [mm/s]
+ #define X2_HYBRID_THRESHOLD 100
+ #define Y_HYBRID_THRESHOLD 100
+ #define Y2_HYBRID_THRESHOLD 100
+ #define Z_HYBRID_THRESHOLD 3
+ #define Z2_HYBRID_THRESHOLD 3
+ #define E0_HYBRID_THRESHOLD 30
+ #define E1_HYBRID_THRESHOLD 30
+ #define E2_HYBRID_THRESHOLD 30
+ #define E3_HYBRID_THRESHOLD 30
+ #define E4_HYBRID_THRESHOLD 30
+
+ /**
+ * Use stallGuard2 to sense an obstacle and trigger an endstop.
+ * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
+ * X, Y, and Z homing will always be done in spreadCycle mode.
+ *
+ * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * Higher values make the system LESS sensitive.
+ * Lower value make the system MORE sensitive.
+ * Too low values can lead to false positives, while too high values will collide the axis without triggering.
+ * It is advised to set X/Y/Z_HOME_BUMP_MM to 0.
+ * M914 X/Y/Z to live tune the setting
+ */
+ //#define SENSORLESS_HOMING // TMC2130 only
+
+ #if ENABLED(SENSORLESS_HOMING)
+ #define X_HOMING_SENSITIVITY 8
+ #define Y_HOMING_SENSITIVITY 8
+ #define Z_HOMING_SENSITIVITY 8
+ #endif
+
+ /**
+ * Enable M122 debugging command for TMC stepper drivers.
+ * M122 S0/1 will enable continous reporting.
+ */
+ //#define TMC_DEBUG
+
+ /**
+ * M915 Z Axis Calibration
+ *
+ * - Adjust Z stepper current,
+ * - Drive the Z axis to its physical maximum, and
+ * - Home Z to account for the lost steps.
+ *
+ * Use M915 Snn to specify the current.
+ * Use M925 Znn to add extra Z height to Z_MAX_POS.
+ */
+ //#define TMC_Z_CALIBRATION
+ #if ENABLED(TMC_Z_CALIBRATION)
+ #define CALIBRATION_CURRENT 250
+ #define CALIBRATION_EXTRA_HEIGHT 10
+ #endif
+
+ /**
+ * You can set your own advanced settings by filling in predefined functions.
+ * A list of available functions can be found on the library github page
+ * https://github.com/teemuatlut/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // TMC2130 || TMC2208
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ */
+#if HAS_DRIVER(L6470)
+
+ #define X_MICROSTEPS 16 // number of microsteps
+ #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
+ #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+
+ #define X2_MICROSTEPS 16
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+
+ #define Y_MICROSTEPS 16
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+
+ #define Y2_MICROSTEPS 16
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+
+ #define Z_MICROSTEPS 16
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+
+ #define Z2_MICROSTEPS 16
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+
+ #define E0_MICROSTEPS 16
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+
+ #define E1_MICROSTEPS 16
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+
+ #define E2_MICROSTEPS 16
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+
+ #define E3_MICROSTEPS 16
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+
+ #define E4_MICROSTEPS 16
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for PLA"
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for ABS"
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Specify an action command to send to the host when the printer is killed.
+ * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_KILL "poweroff"
+
+/**
+ * Specify an action command to send to the host on pause and resume.
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_PAUSE "pause"
+//#define ACTION_ON_RESUME "resume"
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reilabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
+#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Creality/Ender-3/README.md b/Marlin/src/config/examples/Creality/Ender-3/README.md
new file mode 100644
index 000000000000..e64f3ec3d298
--- /dev/null
+++ b/Marlin/src/config/examples/Creality/Ender-3/README.md
@@ -0,0 +1,18 @@
+# Creality Ender Support
+
+This branch is a reverse-engineered version based on the unpublished firmware from Creality. It is **not** the authoritative source, but has been carefully re-built by looking at their firmware and inferring the base version and configuration they used. The basis is the firmware version from "Jul 31 2017 10:16:30". It is based on Marlin 1.0.1, because
+
+* 1.0.0 had very different serial output in `setup()` and overall code structure.
+* 1.0.2 changed the `VERSION_STRING` to include a leading space, and `lcd_init` uses `SET_INPUT` instead of `pinMode`.
+
+Configurations were found by seeing what code was compiled into the firmware, and constants used there.
+
+For U8Glib, at least version 1.14 and at most 1.17 is used, because
+
+* 1.12 didn't have the extra speed argument to u8g_InitCom.
+* 1.13 didn't have the soft reset instruction for UC1701 initialization.
+* 1.18 has a new directory structure.
+
+## Bitmaps
+
+The bootscreen and custom status screens come from Creality's firmware.
diff --git a/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h b/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h
new file mode 100644
index 000000000000..11be930e9c92
--- /dev/null
+++ b/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h
@@ -0,0 +1,96 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Custom Boot Screen bitmap
+ *
+ * Place this file in the root with your configuration files
+ * and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
+ *
+ * Use the Marlin Bitmap Converter to make your own:
+ * http://marlinfw.org/tools/u8glib/converter.html
+ */
+
+#define CUSTOM_BOOTSCREEN_TIMEOUT 1000
+#define CUSTOM_BOOTSCREEN_BMPWIDTH 81
+#define CUSTOM_BOOTSCREEN_INVERTED
+
+const unsigned char custom_start_bmp[] PROGMEM = {
+ B11111111,B11111111,B11111111,B11111111,B11101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11101111,B11101111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11100111,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11100111,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11100011,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11110011,B11001111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11100001,B11100001,B11001111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111110,B01111000,B00000000,B00000000,B00000011,B11011101,B11111111,B11111111,B11111111,B11111111,
+ B11111110,B11111111,B10000000,B01111110,B00000000,B00000001,B11101110,B11111111,B11111111,B11111111,B11111111,
+ B11111110,B01111101,B11001111,B11111100,B00000000,B00000000,B11110111,B01111111,B11111111,B11111111,B11111111,
+ B11111111,B10001110,B00000110,B00000000,B00000000,B00000000,B01111011,B10111111,B11111111,B11111111,B11111111,
+ B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111101,B11011111,B11111111,B11111111,B11111111,
+ B11111111,B11111100,B00000001,B11111110,B00000000,B00000000,B00111110,B11100111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111100,B00000000,B00000011,B00011111,B01110011,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111000,B00000000,B00000001,B10001111,B10000001,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11100000,B00000000,B00000000,B10000011,B11111001,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B00000000,B11111100,B00000000,B00000000,B11110000,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11100000,B00001111,B11111111,B11000000,B00000000,B00000000,B11111111,B11111111,B11111111,
+ B11111111,B11111110,B00000011,B11111111,B11111111,B11000000,B00000000,B00000000,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111001,B00000000,B00000000,B00000000,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000111,B11000000,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B00000000,B00000111,B11100000,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00000111,B11110001,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000111,B11111001,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00000011,B11111001,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000011,B11111001,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11000011,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11100001,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B10111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111011,B11111000,B00111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B11111000,B00111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B01111110,B11110000,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B10001110,B00000011,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00011111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01111111,B11111111,B11111111,B11111111,
+ B11111111,B00000000,B00000000,B01111111,B11111111,B11111111,B11111000,B01111111,B11111111,B11111111,B11111111,
+ B11111111,B10000000,B00000000,B01111111,B11111111,B11111111,B11100000,B01111111,B11111111,B11111111,B11111111,
+ B11111111,B11000011,B11111100,B11111111,B11111111,B11111111,B11111000,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B11000011,B11111100,B11111111,B11111111,B11111111,B11111000,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B10000111,B11111101,B11111111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B10000111,B11111111,B11111111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111111,B11111111,
+ B11111111,B00001111,B11100111,B11110011,B00001111,B11111100,B00100011,B11111100,B00111111,B11111111,B11111111,
+ B11111111,B00001111,B11101111,B10000000,B00000111,B11110000,B00000011,B11110000,B00011110,B00000000,B01111111,
+ B11111110,B00011111,B11001111,B10000001,B10000111,B11000111,B10000111,B11000111,B00001100,B00000000,B01111111,
+ B11111110,B00000000,B00011111,B11000111,B11000111,B10001111,B11000111,B10011111,B00001111,B00001100,B11111111,
+ B11111110,B00000000,B00011111,B10000111,B10001111,B00011111,B10001111,B00011111,B00001111,B00011111,B11111111,
+ B11111100,B00111111,B10011111,B10001111,B10001111,B00011111,B10001110,B00000000,B00011110,B00111111,B11111111,
+ B11111100,B01111111,B00111111,B00001111,B00011110,B00111111,B00011110,B00111111,B11111110,B00111111,B11111111,
+ B11111000,B01111111,B11111111,B00011111,B00011100,B00111111,B00011100,B01111111,B11111100,B01111111,B11111111,
+ B11111000,B11111111,B11111111,B00011110,B00011100,B01111110,B00011100,B01111111,B11111100,B01111111,B11111111,
+ B11110000,B11111111,B11001110,B00111110,B00111100,B01111110,B00111100,B01111111,B10111000,B11111111,B11111111,
+ B11110000,B11111111,B10011110,B00111100,B00111000,B01111100,B00111000,B01111110,B01111000,B11111111,B11111111,
+ B11100001,B11111111,B00111100,B01111100,B01111000,B01111100,B01111000,B00111100,B11110001,B11111111,B11111111,
+ B11100001,B11111000,B00111000,B01111000,B01111000,B00010000,B00011000,B00000001,B11110001,B11111111,B11111111,
+ B00000000,B00000000,B01100000,B00100000,B00111100,B00000000,B01111100,B00000111,B10000000,B01111111,B11111111,
+ B11111111,B11111111,B11111111,B11111111,B11111110,B00011111,B11111110,B00011111,B11111111,B11111111,B11111111
+};
diff --git a/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h b/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h
new file mode 100644
index 000000000000..95e8298c3e06
--- /dev/null
+++ b/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h
@@ -0,0 +1,130 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Custom Status Screen bitmap
+ *
+ * Place this file in the root with your configuration files
+ * and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
+ *
+ * Use the Marlin Bitmap Converter to make your own:
+ * http://marlinfw.org/tools/u8glib/converter.html
+ */
+
+#define STATUS_SCREENWIDTH 128
+#define STATUS_SCREEN_HOTEND_TEXT_X(E) (38 + (E) * 20)
+#define STATUS_SCREEN_BED_TEXT_X (HOTENDS > 1 ? 81 : 73)
+#define STATUS_SCREEN_FAN_TEXT_X 103
+
+//============================================
+
+#if HOTENDS < 2
+
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
+ B11111000,B00000001,B10000000,B00000000,B00001100,B00011111,B11100000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00101110,B00110001,B11010000,
+ B01001000,B00000000,B10000000,B00000000,B00010010,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00101111,B01111011,B11010000,
+ B01000011,B11000011,B10001100,B11010000,B00000010,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00101111,B01111011,B11010000,
+ B01110001,B00100100,B10010010,B01100111,B11001100,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00101110,B00110001,B11010000,
+ B01000001,B00100100,B10011110,B01000000,B00000010,B00011111,B11100000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00101100,B00000000,B11010000,
+ B01001001,B00100100,B10010000,B01000000,B00010010,B00011111,B11100000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00100000,B00110000,B00010000,
+ B11111011,B10110011,B11001110,B11100000,B00001100,B00111111,B11110000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00100000,B01111000,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00100000,B11111100,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00110000,B11111100,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000
+ };
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110011,B10000111,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
+ B11111000,B00000001,B10000000,B00000000,B00001100,B00011111,B11100000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00100000,B00110000,B00010000,
+ B01001000,B00000000,B10000000,B00000000,B00010010,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00100000,B01111000,B00010000,
+ B01000011,B11000011,B10001100,B11010000,B00000010,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00100000,B01111000,B00010000,
+ B01110001,B00100100,B10010010,B01100111,B11001100,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00100000,B00110000,B00010000,
+ B01000001,B00100100,B10011110,B01000000,B00000010,B00011111,B11100000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00101111,B00000011,B11010000,
+ B01001001,B00100100,B10010000,B01000000,B00010010,B00011111,B11100000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00101111,B10000111,B11010000,
+ B11111011,B10110011,B11001110,B11100000,B00001100,B00111111,B11110000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00101111,B10000111,B11010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00100111,B10000111,B10010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00110011,B10000111,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000
+ };
+
+#else // HOTENDS >= 2
+
+ const unsigned char status_screen0_bmp[] PROGMEM = {
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
+ B11111000,B00000001,B10000000,B00000000,B00001100,B00011111,B11100000,B00000001,B11111110,B00000000,B00001000,B00100000,B10000000,B00101110,B00110001,B11010000,
+ B01001000,B00000000,B10000000,B00000000,B00010010,B00111110,B11110000,B00000011,B11001111,B00000000,B00000100,B00010000,B01000000,B00101111,B01111011,B11010000,
+ B01000011,B11000011,B10001100,B11010000,B00000010,B00111100,B11110000,B00000011,B10110111,B00000000,B00000100,B00010000,B01000000,B00101111,B01111011,B11010000,
+ B01110001,B00100100,B10010010,B01100111,B11001100,B00111010,B11110000,B00000011,B11110111,B00000000,B00001000,B00100000,B10000000,B00101110,B00110001,B11010000,
+ B01000001,B00100100,B10011110,B01000000,B00000010,B00011110,B11100000,B00000001,B11101110,B00000000,B00010000,B01000001,B00000000,B00101100,B00000000,B11010000,
+ B01001001,B00100100,B10010000,B01000000,B00010010,B00011110,B11100000,B00000001,B11011110,B00000000,B00100000,B10000010,B00000000,B00100000,B00110000,B00010000,
+ B11111011,B10110011,B11001110,B11100000,B00001100,B00111110,B11110000,B00000011,B10111111,B00000000,B00100000,B10000010,B00000000,B00100000,B01111000,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B11110000,B00000011,B10000111,B00000000,B00010000,B01000001,B00000000,B00100000,B11111100,B00010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000011,B11111111,B00000000,B00001000,B00100000,B10000000,B00110000,B11111100,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B01111000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00110000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
+ };
+ const unsigned char status_screen1_bmp[] PROGMEM = {
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110011,B10000111,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
+ B11111000,B00000001,B10000000,B00000000,B00001100,B00011111,B11100000,B00000001,B11111110,B00000000,B00001000,B00100000,B10000000,B00100000,B00110000,B00010000,
+ B01001000,B00000000,B10000000,B00000000,B00010010,B00111110,B11110000,B00000011,B11001111,B00000000,B00000100,B00010000,B01000000,B00100000,B01111000,B00010000,
+ B01000011,B11000011,B10001100,B11010000,B00000010,B00111100,B11110000,B00000011,B10110111,B00000000,B00000100,B00010000,B01000000,B00100000,B01111000,B00010000,
+ B01110001,B00100100,B10010010,B01100111,B11001100,B00111010,B11110000,B00000011,B11110111,B00000000,B00001000,B00100000,B10000000,B00100000,B00110000,B00010000,
+ B01000001,B00100100,B10011110,B01000000,B00000010,B00011110,B11100000,B00000001,B11101110,B00000000,B00010000,B01000001,B00000000,B00101111,B00000011,B11010000,
+ B01001001,B00100100,B10010000,B01000000,B00010010,B00011110,B11100000,B00000001,B11011110,B00000000,B00100000,B10000010,B00000000,B00101111,B10000111,B11010000,
+ B11111011,B10110011,B11001110,B11100000,B00001100,B00111110,B11110000,B00000011,B10111111,B00000000,B00100000,B10000010,B00000000,B00101111,B10000111,B11010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111110,B11110000,B00000011,B10000111,B00000000,B00010000,B01000001,B00000000,B00100111,B10000111,B10010000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000011,B11111111,B00000000,B00001000,B00100000,B10000000,B00110011,B10000111,B00110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B01111000,B00000000,B11111111,B11111111,B11000000,B00111111,B11111111,B11110000,
+ B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00110000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000
+ };
+
+#endif // HOTENDS >= 2
diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
index 09dbb0e1333e..511c6ece9ab5 100644
--- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 190
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 500
@@ -554,10 +561,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -626,15 +673,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -686,6 +732,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -715,6 +762,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -758,10 +808,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -785,6 +835,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -823,9 +874,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -889,6 +937,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1067,8 +1119,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
#define LCD_BED_LEVELING
@@ -1080,6 +1132,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1353,11 +1410,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1385,19 +1441,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1424,6 +1467,15 @@
*/
//#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
//
@@ -1488,12 +1540,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1517,40 +1575,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1559,28 +1583,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1588,39 +1590,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1667,6 +1658,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1687,25 +1755,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1721,6 +1775,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1742,6 +1803,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1801,7 +1890,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
index 65f6557b09ef..e8a56d519aa2 100644
--- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Einstart-S/Configuration.h b/Marlin/src/config/examples/Einstart-S/Configuration.h
new file mode 100644
index 000000000000..7222773dba98
--- /dev/null
+++ b/Marlin/src/config/examples/Einstart-S/Configuration.h
@@ -0,0 +1,1945 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#ifndef CONFIGURATION_H
+#define CONFIGURATION_H
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// 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
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "elsie tech corp" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respecfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * 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.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_EINSTART_S
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "The Shining"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
+#endif
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+#if ENABLED(PARKING_EXTRUDER)
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds a new code, M165, to set the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * 666 : Custom table generated for 200K thermistor with 10k pullup on Einstart S
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 666
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_BED 0
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // Einstart S
+ // Autotune M303 S180 C8
+ #define DEFAULT_Kp 15.31
+ #define DEFAULT_Ki 0.93
+ #define DEFAULT_Kd 63.03
+
+ // Ultimaker
+ //#define DEFAULT_Kp 22.2
+ //#define DEFAULT_Ki 1.08
+ //#define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * heater. If your configuration is significantly different than this and you don't understand
+ * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ */
+//#define PIDTEMPBED
+
+//#define BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * 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! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 200
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= Mechanical Settings =========================
+//===========================================================================
+
+// @section machine
+
+// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
+// either in the usual order or reversed
+//#define COREXY
+//#define COREXZ
+//#define COREYZ
+//#define COREYX
+//#define COREZX
+//#define COREZY
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+//#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// 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).
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+//#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+//#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+//#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+//#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+
+#define X_STOP_INVERTING true
+#define Y_STOP_INVERTING true
+#define Z_STOP_INVERTING true
+
+// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * Default Axis Steps Per Unit (steps/mm)
+ * Override with M92
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 96.337120 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
+
+/**
+ * Default Max Acceleration (change/s) change = mm/s
+ * (Maximum start speed for accelerated moves)
+ * Override with M201
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_ACCELERATION { 2000, 2000, 100, 10000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 2000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 2000 // X, Y, Z acceleration for travel (non printing) moves
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#define DEFAULT_XJERK 10.0
+#define DEFAULT_YJERK 10.0
+#define DEFAULT_ZJERK 0.3
+#define DEFAULT_EJERK 5.0
+
+/**
+ * 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 =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+
+/**
+ * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
+ * (e.g., an inductive probe or a nozzle-based probe-switch.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+//#define Z_AFTER_PROBING 5 // Z position after probing is done
+
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+
+// For M851 give a range for adjusting the Z probe offset
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 1
+#define Y_ENABLE_ON 1
+#define Z_ENABLE_ON 1
+#define E_ENABLE_ON 1 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR true
+#define INVERT_Y_DIR false
+#define INVERT_Z_DIR true
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR false
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR 1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 160
+#define Y_BED_SIZE 160
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS 0
+#define Y_MIN_POS 0
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 165
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * 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 MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// Manually set the home position. Leave these undefined for automatic settings.
+// For DELTA this is the top-center of the Cartesian print volume.
+//#define MANUAL_X_HOME_POS 0
+//#define MANUAL_Y_HOME_POS 0
+//#define MANUAL_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_TEMP_HOTEND 180
+#define PREHEAT_1_TEMP_BED 70
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 110
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * P1 Raise the nozzle always to Z-park height.
+ * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
+ */
+//#define NOZZLE_PARK_FEATURE
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * 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.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+//#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://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.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// 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/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// 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: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ #define U8GLIB_SSD1306
+ //#define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//
+// Einstart S OLED SSD1306
+//
+#define U8GLIB_SH1106_EINSTART
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * as the Arduino cannot handle the current the LEDs will require.
+ * Failure to follow this precaution can destroy your Arduino!
+ * NOTE: A separate 5V power supply is required! The Neopixel LED needs
+ * more current than the Arduino 5V linear regulator can produce.
+ * *** CAUTION ***
+ *
+ * LED Type. Enable only one of the following two options.
+ *
+ */
+//#define RGB_LED
+//#define RGBW_LED
+
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#endif // CONFIGURATION_H
diff --git a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h
new file mode 100644
index 000000000000..964a2c104aec
--- /dev/null
+++ b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h
@@ -0,0 +1,1728 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#ifndef CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// When first starting the main fan, run it at full speed for the
+// given number of milliseconds. This gets the fan spinning reliably
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
+//#define FAN_KICKSTART_TIME 100
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * Multiple extruders can be assigned to the same pin in which case
+ * the fan will turn on when any selected extruder is above the threshold.
+ */
+#define E0_AUTO_FAN_PIN -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
+ #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
+ #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
+ #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
+ //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
+ //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
+ #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+// Enable this for dual x-carriage printers.
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ // Configuration for second X-carriage
+ // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
+ // the second x-carriage always homes to the maximum endstop.
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+
+ // There are a few selectable movement modes for dual x-carriages using M605 S
+ // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ // as long as it supports dual x-carriages. (M605 S0)
+ // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ // that additional slicer support is not required. (M605 S1)
+ // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+
+ // Default settings in "Auto-park Mode"
+ #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
+ #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
+#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
+#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+
+//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
+
+// @section lcd
+
+// Include a page of printer information in the LCD Main Menu
+//#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+//#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ //#define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if ENABLED(DOGLCD)
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ #if ENABLED(U8GLIB_ST7920)
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+#endif // DOGLCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+//#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+ //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
+ * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ */
+//#define LIN_ADVANCE
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ */
+#define MINIMUM_STEPPER_DIR_DELAY 0
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ */
+#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ */
+#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// The number of linear motions that can be in the plan at any give time.
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
+#if ENABLED(SDSUPPORT)
+ #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// @section extras
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT // ONLY PARTIALLY TESTED
+#if ENABLED(FWRETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZLIFT 0 // Default retract Z-lift
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+#endif
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+//#define ADVANCED_PAUSE_FEATURE
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * Enable this section if you have TMC26X motor drivers.
+ * You will need to import the TMC26XStepper library into the Arduino IDE for this
+ * (https://github.com/trinamic/TMC26XStepper.git)
+ */
+//#define HAVE_TMC26X
+#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
+ //#define X_IS_TMC26X
+ //#define X2_IS_TMC26X
+ //#define Y_IS_TMC26X
+ //#define Y2_IS_TMC26X
+ //#define Z_IS_TMC26X
+ //#define Z2_IS_TMC26X
+ //#define E0_IS_TMC26X
+ //#define E1_IS_TMC26X
+ //#define E2_IS_TMC26X
+ //#define E3_IS_TMC26X
+ //#define E4_IS_TMC26X
+
+ #define X_MAX_CURRENT 1000 // in mA
+ #define X_SENSE_RESISTOR 91 // in mOhms
+ #define X_MICROSTEPS 16 // number of microsteps
+
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+
+#endif
+
+// @section tmc_smart
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
+ * the hardware SPI interface on your board and define the required CS pins
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ */
+//#define HAVE_TMC2130
+#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
+ //#define X_IS_TMC2130
+ //#define X2_IS_TMC2130
+ //#define Y_IS_TMC2130
+ //#define Y2_IS_TMC2130
+ //#define Z_IS_TMC2130
+ //#define Z2_IS_TMC2130
+ //#define E0_IS_TMC2130
+ //#define E1_IS_TMC2130
+ //#define E2_IS_TMC2130
+ //#define E3_IS_TMC2130
+ //#define E4_IS_TMC2130
+#endif
+
+/**
+ * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
+ * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
+ * to PDN_UART without a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * You'll also need the TMC2208Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2208Stepper).
+ */
+//#define HAVE_TMC2208
+#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
+ //#define X_IS_TMC2208
+ //#define X2_IS_TMC2208
+ //#define Y_IS_TMC2208
+ //#define Y2_IS_TMC2208
+ //#define Z_IS_TMC2208
+ //#define Z2_IS_TMC2208
+ //#define E0_IS_TMC2208
+ //#define E1_IS_TMC2208
+ //#define E2_IS_TMC2208
+ //#define E3_IS_TMC2208
+ //#define E4_IS_TMC2208
+#endif
+
+#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+
+ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
+ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
+ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
+
+ #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+
+ /**
+ * Use software SPI for TMC2130.
+ * The default SW SPI pins are defined the respective pins files,
+ * but you can override or define them here.
+ */
+ //#define TMC_USE_SW_SPI
+ //#define TMC_SW_MOSI -1
+ //#define TMC_SW_MISO -1
+ //#define TMC_SW_SCK -1
+
+ /**
+ * Use Trinamic's ultra quiet stepping mode.
+ * When disabled, Marlin will use spreadCycle stepping mode.
+ */
+ #define STEALTHCHOP
+
+ /**
+ * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * like overtemperature and short to ground. TMC2208 requires hardware serial.
+ * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * M911 - Report stepper driver overtemperature pre-warn condition.
+ * M912 - Clear stepper driver overtemperature pre-warn condition flag.
+ * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
+ */
+ //#define MONITOR_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_DRIVER_STATUS)
+ #define CURRENT_STEP_DOWN 50 // [mA]
+ #define REPORT_CURRENT_CHANGE
+ #define STOP_ON_ERROR
+ #endif
+
+ /**
+ * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
+ * This mode allows for faster movements at the expense of higher noise levels.
+ * STEALTHCHOP needs to be enabled.
+ * M913 X/Y/Z/E to live tune the setting
+ */
+ //#define HYBRID_THRESHOLD
+
+ #define X_HYBRID_THRESHOLD 100 // [mm/s]
+ #define X2_HYBRID_THRESHOLD 100
+ #define Y_HYBRID_THRESHOLD 100
+ #define Y2_HYBRID_THRESHOLD 100
+ #define Z_HYBRID_THRESHOLD 3
+ #define Z2_HYBRID_THRESHOLD 3
+ #define E0_HYBRID_THRESHOLD 30
+ #define E1_HYBRID_THRESHOLD 30
+ #define E2_HYBRID_THRESHOLD 30
+ #define E3_HYBRID_THRESHOLD 30
+ #define E4_HYBRID_THRESHOLD 30
+
+ /**
+ * Use stallGuard2 to sense an obstacle and trigger an endstop.
+ * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
+ * X, Y, and Z homing will always be done in spreadCycle mode.
+ *
+ * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * Higher values make the system LESS sensitive.
+ * Lower value make the system MORE sensitive.
+ * Too low values can lead to false positives, while too high values will collide the axis without triggering.
+ * It is advised to set X/Y/Z_HOME_BUMP_MM to 0.
+ * M914 X/Y/Z to live tune the setting
+ */
+ //#define SENSORLESS_HOMING // TMC2130 only
+
+ #if ENABLED(SENSORLESS_HOMING)
+ #define X_HOMING_SENSITIVITY 8
+ #define Y_HOMING_SENSITIVITY 8
+ #define Z_HOMING_SENSITIVITY 8
+ #endif
+
+ /**
+ * Enable M122 debugging command for TMC stepper drivers.
+ * M122 S0/1 will enable continous reporting.
+ */
+ //#define TMC_DEBUG
+
+ /**
+ * M915 Z Axis Calibration
+ *
+ * - Adjust Z stepper current,
+ * - Drive the Z axis to its physical maximum, and
+ * - Home Z to account for the lost steps.
+ *
+ * Use M915 Snn to specify the current.
+ * Use M925 Znn to add extra Z height to Z_MAX_POS.
+ */
+ //#define TMC_Z_CALIBRATION
+ #if ENABLED(TMC_Z_CALIBRATION)
+ #define CALIBRATION_CURRENT 250
+ #define CALIBRATION_EXTRA_HEIGHT 10
+ #endif
+
+ /**
+ * You can set your own advanced settings by filling in predefined functions.
+ * A list of available functions can be found on the library github page
+ * https://github.com/teemuatlut/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // TMC2130 || TMC2208
+
+// @section L6470
+
+/**
+ * Enable this section if you have L6470 motor drivers.
+ * You need to import the L6470 library into the Arduino IDE for this.
+ * (https://github.com/ameyer/Arduino-L6470)
+ */
+
+//#define HAVE_L6470DRIVER
+#if ENABLED(HAVE_L6470DRIVER)
+
+ //#define X_IS_L6470
+ //#define X2_IS_L6470
+ //#define Y_IS_L6470
+ //#define Y2_IS_L6470
+ //#define Z_IS_L6470
+ //#define Z2_IS_L6470
+ //#define E0_IS_L6470
+ //#define E1_IS_L6470
+ //#define E2_IS_L6470
+ //#define E3_IS_L6470
+ //#define E4_IS_L6470
+
+ #define X_MICROSTEPS 16 // number of microsteps
+ #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
+ #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+
+ #define X2_MICROSTEPS 16
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+
+ #define Y_MICROSTEPS 16
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+
+ #define Y2_MICROSTEPS 16
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+
+ #define Z_MICROSTEPS 16
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+
+ #define Z2_MICROSTEPS 16
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+
+ #define E0_MICROSTEPS 16
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+
+ #define E1_MICROSTEPS 16
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+
+ #define E2_MICROSTEPS 16
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+
+ #define E3_MICROSTEPS 16
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+
+ #define E4_MICROSTEPS 16
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+
+#endif
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for PLA"
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for ABS"
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Specify an action command to send to the host when the printer is killed.
+ * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_KILL "poweroff"
+
+/**
+ * Specify an action command to send to the host on pause and resume.
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_PAUSE "pause"
+//#define ACTION_ON_RESUME "resume"
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reilabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
+#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Einstart-S/readme.md b/Marlin/src/config/examples/Einstart-S/readme.md
new file mode 100644
index 000000000000..56635ec7a0cf
--- /dev/null
+++ b/Marlin/src/config/examples/Einstart-S/readme.md
@@ -0,0 +1,152 @@
+## Einstart S Machine Notes
+
+The Einstart S is a commercial machine that ships with a proprietary firmware and "licensed" slicer program which requires the original SD card or license file (.lic/.reg) from support in order to function. The impetus for the port was that I acquired the machine on the weekend when tech support was closed.
+
+## Specifications:
+
+ - Powder coated, formed steel enclosure
+ - Machined Aluminum internal axis support frame
+ - Genuine matched HIWIN rails on all axis
+ - Genuine Minebea NEMA17 motors (200 steps/rev)
+ - THC7128 3A Stepper Drivers (configured for 16 microsteps, loud)
+ - 160x160 magnetically coupled non-heated bed
+ - PLA Only Direct Drive extruder
+ - SH1106 OLED Display w/ Cardinal navigation
+ - 9533 I2C PWM RGB LED Chassis illumination
+ - Onboard SD-Card Support
+
+## Initial modifications
+
+### Bootloader/Marlin installation
+
+This machine probably doesn't ship with the arduino boot loader, so unless you reflow a 2560 on there to replace the atmega1280 like I did (to preserve the original firmware), you'll need to use ISP to do an initial firmware load and/or bootloader flash!
+
+It's not that bad though, you can just buy an ISP programmer with the appropriate header, or build an ISP programmer using the Arduino ISP sketch (wiring is easier if you use the "old style wiring" which utilizes the following pinout: (see the comments in the ArduinoISP sketch).
+
+I used an arduino Nano and a header I had lying around, but you could do the same with a nano and some dupont headers cut and soldered to the board, and taped/glued into a header.
+
+Triple check your pinouts, it shouldn't fry if connected backwards but if your pinout is wrong you're going to struggle for sure.
+
+#### ArduinoISP Sketch pinout for 10pin ISP header using "old style wiring":
+
+See the comments in the ArduinoISP sketch under File:Examples:ArduinoISP
+
+1 MOSI D11
+2 5v Vcc
+3 N/C
+4 GND
+5 RES D10
+6 N/C
+7 SCK D13
+8 N/C
+9 MISO D12
+10 GND GND
+
+#### Einstart Motherboard ISP Header Pinout
+
+The 10 pin ISP Header is located to the right of the ATMEGA chip, just above the long LCD header.
+
+#### ISP Diagram
+
+<--- Face of chassis
+
+MOSI ( 1 ) ( 2 ) Vcc
+ N/C ( 3 ) ( 4 ) GND
+ RST ( 5 ) ( 6 ) GND
+ SCK ( 7 ) ( 8 ) GND
+MISO ( 9 ) (10 ) GND
+
+Component Plugs --->
+
+### Motherboard Diagram
+
+ |1234|1234|1234|1234|12|12|12|12|12|12|12|12|12|12|123|12|1234|
+ ---------------------------------------------------------------
+| XMOT YMOT ZMOT EMOT EF HB HE PF ZS YS XS PS BT ET PT1 TC VBRG |
+| ===== ====== [DC|
+|====== ====== ____ ISP IC1__ ___|
+| |1280| ::::: | | |USB|
+| |____| 1 |__| |___|
+| BUTTON |SD |
+| GDLRUO LCD |___|
+|________________________[......][....................]_________|
+
+Legend:
+
+XMOT X-Motor
+YMOT Y-Motor
+ZMOT Z-Motor
+EMOT E-Motor
+EF Extruder Fan
+HB Heated Bed (PWM)
+HE Hot End (PWM)
+PF Part Fan (PWM)
+ZS Z-Endstop (Max)
+YS Y-Endstop (Min)
+XS X-Endstop (Min)
+PS SPST Switch to enable DC 24v
+BT Bed Thermistor (header not populated)
+ET Extruder Thermistor
+PT1 PT100 Thermocouple (not populated)
+TC Thermocouple (not populated)
+VBRG LED Output from PCA5933
+BUTTONS
+G GND (buttons are pulled low on activation)
+D DOWN
+L LEFT
+R RIGHT
+U UP
+O OK (MIDDLE)
+
+## Uploading Marlin firmware to a stock Einstart S
+
+### Summary:
+
+Make, buy or steal a 10 pin ISP programmer and select the appropriate programmer option via Tools:Programmer in Arduino IDE, use the Sketch:Upload Using Programmer command or Shift-Ctrl-U (vs Ctrl-U to upload via serial).
+
+### Detailed procedure:
+
+You can either load Marlin directly via ISP programmer (easiest, but requires opening the chassis every time you want to change/update firmware) or, just program the bootloader which will enable later uploads via USB. HOWEVER, to actually upload the sketch you will need one of the following:
+
+ - ISP programming header (ArduinoISP sketch, pinout below)
+ - OR
+ - Install bootloader on atmega1280 to enable native USB uploads (also requires ISP).
+ - AND
+ - Connect button between RESET and GND on ISP header, release post compile just before upload starts.
+ - OR
+ - Install permanent modification described below, requires no button press during upload.
+
+### Permanent modification to enable USB uploads via Arduino IDE
+
+As a permanent modification to enable direct USB upload from the arduino IDE, you would need to flash the boot loader using ISP first; but then you can solder a wire or 100n capacaitor between the DTR line on the FTDI to the reset line, which is conveniently located in several places on the board.
+
+#### FTDI Chip Diagram (IC1)
+
+ ______
+ TXD --|1 28|--OSCO
+ DTR --|2 27|--OSCI
+ RTS --|3 26|--TEST
+ VCCIO--|4 25|--AGND
+ RXD --|5 24|--N/C
+ RI --|6 23|--CBUS0
+ GND --|7 22|--CBUS1
+ N/C --|8 21|--GND
+ DSR --|9 20|--Vcc
+ DCD --|10 19|--RES
+ CTS --|11 18|--GND
+ CBUS4--|12 17|--3V3
+ CBUS2--|13 16|--USBDM
+ CBUS3--|14 15|--USBDP
+ |______|
+
+#### Arduino Reset Circuit
+
+ DTR-----||----GND----/\/\/\/----Vcc
+ 100nf 10k
+
+With this modification you no longer need the reset button and you can program directly from the Arduino IDE.
+
+### Power notes during flashing.
+
+You do NOT need power connected when flashing via ISP.
+You DO need power when flashing via USB Serial but you MUST time the release of the reset line to allow the upload unless you've performed the permanent modification.
\ No newline at end of file
diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h
index 545522045e55..8aeadeb90af3 100644
--- a/Marlin/src/config/examples/Felix/Configuration.h
+++ b/Marlin/src/config/examples/Felix/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -427,15 +429,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -525,10 +532,50 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -598,15 +645,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -658,6 +704,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -687,6 +734,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -730,10 +780,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -757,6 +807,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -795,9 +846,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -861,6 +909,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1039,8 +1091,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1052,6 +1104,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1325,11 +1382,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1357,19 +1413,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1396,6 +1439,15 @@
*/
//#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
//
@@ -1460,12 +1512,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1489,40 +1547,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1531,28 +1555,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1560,39 +1562,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1639,6 +1630,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1659,25 +1727,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1693,6 +1747,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1714,6 +1775,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1773,7 +1862,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h
index 6fb4725e6a14..a72348067f50 100644
--- a/Marlin/src/config/examples/Felix/Configuration_adv.h
+++ b/Marlin/src/config/examples/Felix/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h
index 17250f5242fc..a1fd1a9fce94 100644
--- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h
+++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 1
@@ -427,15 +429,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -525,10 +532,50 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -598,15 +645,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -658,6 +704,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -687,6 +734,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -730,10 +780,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -757,6 +807,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -795,9 +846,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -861,6 +909,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1039,8 +1091,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1052,6 +1104,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1325,11 +1382,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1357,19 +1413,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1396,6 +1439,15 @@
*/
//#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
//
@@ -1460,12 +1512,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1489,40 +1547,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1531,28 +1555,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1560,39 +1562,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1639,6 +1630,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1659,25 +1727,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1693,6 +1747,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1714,6 +1775,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1773,7 +1862,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
index 54a0495fdd65..d273ae8c7067 100644
--- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
+++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -451,15 +453,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -553,6 +560,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -622,15 +646,14 @@
#define DEFAULT_EJERK 4.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -682,6 +705,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -711,6 +735,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -754,10 +781,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 7500
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -781,6 +808,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 3 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 3 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -819,9 +847,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -885,6 +910,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -991,10 +1020,10 @@
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- //#define LEFT_PROBE_BED_POSITION (X_MIN_POS + 33)
- //#define RIGHT_PROBE_BED_POSITION (X_MAX_POS - 37)
- //#define FRONT_PROBE_BED_POSITION (Y_MIN_POS + 7)
- //#define BACK_PROBE_BED_POSITION (Y_MAX_POS - 12)
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1017,17 +1046,6 @@
#endif
-#elif ENABLED(AUTO_BED_LEVELING_3POINT)
-
- // 3 arbitrary points to probe.
- // A simple cross-product is used to estimate the plane of the bed.
- #define PROBE_PT_1_X 39
- #define PROBE_PT_1_Y 170
- #define PROBE_PT_2_X 39
- #define PROBE_PT_2_Y 10
- #define PROBE_PT_3_X 170
- #define PROBE_PT_3_Y 10
-
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1038,14 +1056,7 @@
#define MESH_INSET 0 // Set Mesh bounds as an inset region of the bed
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
- #define GRID_MAX_POINTS_Y 10
-
- #define PROBE_PT_1_X 45 // Probing points for 3-Point leveling of the mesh
- #define PROBE_PT_1_Y 170
- #define PROBE_PT_2_X 45
- #define PROBE_PT_2_Y 25
- #define PROBE_PT_3_X 180
- #define PROBE_PT_3_Y 25
+ #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
@@ -1072,17 +1083,17 @@
* Override if the automatically selected points are inadequate.
*/
#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
+ #define PROBE_PT_1_X 45
+ #define PROBE_PT_1_Y 170
+ #define PROBE_PT_2_X 45
+ #define PROBE_PT_2_Y 25
+ #define PROBE_PT_3_X 180
+ #define PROBE_PT_3_Y 25
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1094,6 +1105,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1367,11 +1383,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1399,19 +1414,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1438,6 +1440,15 @@
*/
#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
//
@@ -1502,12 +1513,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1531,40 +1548,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1573,28 +1556,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1602,39 +1563,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1681,6 +1631,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1701,25 +1728,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1735,6 +1748,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1756,6 +1776,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1815,7 +1863,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
index 51c485a6d5fd..3aa686217f4e 100644
--- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
+++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,11 +1627,8 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
@@ -1592,23 +1636,28 @@
#define MAX7219_DIN_PIN 57 // on RAMPS
#define MAX7219_LOAD_PIN 44 // on RAMPS
-//#define MAX7219_CLK_PIN 77 // on Re-ARM // Configuration of the 3 pins to control the display
-//#define MAX7219_DIN_PIN 78 // on Re-ARM
-//#define MAX7219_LOAD_PIN 79 // on Re-ARM
+//#define MAX7219_CLK_PIN P1_04 // on Re-ARM ENET_TX_EN J12-10
+//#define MAX7219_DIN_PIN P1_00 // on Re-ARM ENET_TXD0 J12-11
+//#define MAX7219_LOAD_PIN P1_01 // on Re-ARM ENET_TXD1 J12-12
-//#define MAX7219_CLK_PIN 30 // for RAMPS E1 // Configuration of the 3 pins to control the display
-//#define MAX7219_DIN_PIN 34 // for RAMPS E1
-//#define MAX7219_LOAD_PIN 36 // for RAMPS E1
+//#define MAX7219_CLK_PIN P4_29 // for RAMPS E1 on Re-ARM E1_ENABLE_PIN P4_29
+//#define MAX7219_DIN_PIN P2_13 // for RAMPS E1 on Re-ARM E1_DIR_PIN P2_13
+//#define MAX7219_LOAD_PIN P2_08 // for RAMPS E1 on Re-ARM E1_STEP_PIN P2_08
+ #define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 2 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE -90 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1626,4 +1675,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
index 835517cb217b..701bfff164e6 100644
--- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -461,15 +463,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -559,10 +566,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -631,15 +678,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -691,6 +737,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -720,6 +767,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -763,10 +813,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -790,6 +840,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -828,9 +879,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -894,6 +942,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1072,8 +1124,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1085,6 +1137,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1358,11 +1415,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1390,19 +1446,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1429,6 +1472,15 @@
*/
//#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
//
@@ -1493,12 +1545,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1522,40 +1580,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1564,28 +1588,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1593,39 +1595,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1672,6 +1663,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1692,25 +1760,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1726,6 +1780,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1747,6 +1808,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1806,7 +1895,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
index 33669e37d16e..b21b159e1184 100644
--- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 300
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 4.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 6 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 6 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
#define LCD_FEEDBACK_FREQUENCY_HZ 1000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
index b4e227732ac6..1f63eaae3dfe 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -461,15 +463,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -559,10 +566,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -631,15 +678,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -692,6 +738,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -721,6 +768,9 @@
* readings with inductive probes and piezo sensors.
*/
#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
#define PROBING_FANS_OFF // Turn fans off when probing
#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -764,10 +814,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST (20*60)
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -791,6 +841,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -829,9 +880,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -895,6 +943,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1073,8 +1125,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1086,6 +1138,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1359,11 +1416,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1391,19 +1447,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1430,6 +1473,15 @@
*/
#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
//
@@ -1494,12 +1546,18 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1523,40 +1581,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1565,28 +1589,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1594,39 +1596,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1673,6 +1664,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1693,25 +1761,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1727,6 +1781,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1748,6 +1809,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1807,7 +1896,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
index 89a02442dc85..226911d180d4 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -461,15 +463,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -559,10 +566,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -631,15 +678,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -691,6 +737,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -720,6 +767,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -763,10 +813,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST (20*60)
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -790,6 +840,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -828,9 +879,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -894,6 +942,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1072,8 +1124,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
#define LCD_BED_LEVELING
@@ -1085,6 +1137,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1358,11 +1415,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1390,19 +1446,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1429,6 +1472,15 @@
*/
#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
//
@@ -1493,12 +1545,18 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1522,40 +1580,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1564,28 +1588,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1593,39 +1595,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1672,6 +1663,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1692,25 +1760,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1726,6 +1780,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1747,6 +1808,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1806,7 +1895,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
new file mode 100644
index 000000000000..794f9e617679
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
@@ -0,0 +1,1953 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#ifndef CONFIGURATION_H
+#define CONFIGURATION_H
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// 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
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(Phr3d13, default config)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * 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.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_GT2560_REV_A
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Pro C"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5]
+#define EXTRUDERS 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.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
+#endif
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+#if ENABLED(PARKING_EXTRUDER)
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds a new code, M165, to set the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+#define HOTEND_OFFSET_X {0.0, 32.00} // (in mm) for each extruder, offset of the hotend on the X axis
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 1
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // Ultimaker
+ #define DEFAULT_Kp 22.2
+ #define DEFAULT_Ki 1.08
+ #define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * heater. If your configuration is significantly different than this and you don't understand
+ * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ */
+//#define PIDTEMPBED
+
+//#define BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * 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! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 200
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= Mechanical Settings =========================
+//===========================================================================
+
+// @section machine
+
+// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
+// either in the usual order or reversed
+//#define COREXY
+//#define COREXZ
+//#define COREYZ
+//#define COREYX
+//#define COREZX
+//#define COREZY
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// 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).
+#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+#define DISTINCT_E_FACTORS
+
+/**
+ * Default Axis Steps Per Unit (steps/mm)
+ * Override with M92
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 2560, 95, 95 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
+
+/**
+ * Default Max Acceleration (change/s) change = mm/s
+ * (Maximum start speed for accelerated moves)
+ * Override with M201
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#define DEFAULT_XJERK 10.0
+#define DEFAULT_YJERK 10.0
+#define DEFAULT_ZJERK 0.3
+#define DEFAULT_EJERK 5.0
+
+/**
+ * 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 =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#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.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // 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
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR true
+#define INVERT_Y_DIR false
+#define INVERT_Z_DIR false
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR true
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 200
+#define Y_BED_SIZE 200
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS 0
+#define Y_MIN_POS 0
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 180
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * 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 MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// Manually set the home position. Leave these undefined for automatic settings.
+// For DELTA this is the top-center of the Cartesian print volume.
+//#define MANUAL_X_HOME_POS 0
+//#define MANUAL_Y_HOME_POS 0
+//#define MANUAL_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_TEMP_HOTEND 200
+#define PREHEAT_1_TEMP_BED 65
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_TEMP_HOTEND 235
+#define PREHEAT_2_TEMP_BED 95
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * P1 Raise the nozzle always to Z-park height.
+ * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
+ */
+#define NOZZLE_PARK_FEATURE
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * 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.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://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.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// 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/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// 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: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a 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 ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#endif // CONFIGURATION_H
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
new file mode 100644
index 000000000000..18a7483cbc2a
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
@@ -0,0 +1,1681 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#ifndef CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// When first starting the main fan, run it at full speed for the
+// given number of milliseconds. This gets the fan spinning reliably
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
+//#define FAN_KICKSTART_TIME 100
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * Multiple extruders can be assigned to the same pin in which case
+ * the fan will turn on when any selected extruder is above the threshold.
+ */
+#define E0_AUTO_FAN_PIN -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
+ #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
+ #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
+ #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
+ //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
+ //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
+ #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+// Enable this for dual x-carriage printers.
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ // Configuration for second X-carriage
+ // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
+ // the second x-carriage always homes to the maximum endstop.
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+
+ // There are a few selectable movement modes for dual x-carriages using M605 S
+ // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ // as long as it supports dual x-carriages. (M605 S0)
+ // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ // that additional slicer support is not required. (M605 S1)
+ // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+
+ // Default settings in "Auto-park Mode"
+ #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
+ #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
+#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
+#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+
+//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
+
+// @section lcd
+
+// Include a page of printer information in the LCD Main Menu
+#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ #define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ #define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if ENABLED(DOGLCD)
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ #if ENABLED(U8GLIB_ST7920)
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+#endif // DOGLCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+ //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
+ * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ */
+#define LIN_ADVANCE
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// The number of linear motions that can be in the plan at any give time.
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
+#if ENABLED(SDSUPPORT)
+ #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// @section extras
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT // ONLY PARTIALLY TESTED
+#if ENABLED(FWRETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZLIFT 0 // Default retract Z-lift
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+#endif
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+#define ADVANCED_PAUSE_FEATURE
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #define X_MAX_CURRENT 1000 // in mA
+ #define X_SENSE_RESISTOR 91 // in mOhms
+ #define X_MICROSTEPS 16 // number of microsteps
+
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
+ * the hardware SPI interface on your board and define the required CS pins
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
+ * to PDN_UART without a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
+ */
+#if HAS_TRINAMIC
+
+ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
+ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
+ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
+
+ #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+
+ /**
+ * Use software SPI for TMC2130.
+ * The default SW SPI pins are defined the respective pins files,
+ * but you can override or define them here.
+ */
+ //#define TMC_USE_SW_SPI
+ //#define TMC_SW_MOSI -1
+ //#define TMC_SW_MISO -1
+ //#define TMC_SW_SCK -1
+
+ /**
+ * Use Trinamic's ultra quiet stepping mode.
+ * When disabled, Marlin will use spreadCycle stepping mode.
+ */
+ #define STEALTHCHOP
+
+ /**
+ * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * like overtemperature and short to ground. TMC2208 requires hardware serial.
+ * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * M911 - Report stepper driver overtemperature pre-warn condition.
+ * M912 - Clear stepper driver overtemperature pre-warn condition flag.
+ * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
+ */
+ //#define MONITOR_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_DRIVER_STATUS)
+ #define CURRENT_STEP_DOWN 50 // [mA]
+ #define REPORT_CURRENT_CHANGE
+ #define STOP_ON_ERROR
+ #endif
+
+ /**
+ * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
+ * This mode allows for faster movements at the expense of higher noise levels.
+ * STEALTHCHOP needs to be enabled.
+ * M913 X/Y/Z/E to live tune the setting
+ */
+ //#define HYBRID_THRESHOLD
+
+ #define X_HYBRID_THRESHOLD 100 // [mm/s]
+ #define X2_HYBRID_THRESHOLD 100
+ #define Y_HYBRID_THRESHOLD 100
+ #define Y2_HYBRID_THRESHOLD 100
+ #define Z_HYBRID_THRESHOLD 3
+ #define Z2_HYBRID_THRESHOLD 3
+ #define E0_HYBRID_THRESHOLD 30
+ #define E1_HYBRID_THRESHOLD 30
+ #define E2_HYBRID_THRESHOLD 30
+ #define E3_HYBRID_THRESHOLD 30
+ #define E4_HYBRID_THRESHOLD 30
+
+ /**
+ * Use stallGuard2 to sense an obstacle and trigger an endstop.
+ * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
+ * X, Y, and Z homing will always be done in spreadCycle mode.
+ *
+ * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * Higher values make the system LESS sensitive.
+ * Lower value make the system MORE sensitive.
+ * Too low values can lead to false positives, while too high values will collide the axis without triggering.
+ * It is advised to set X/Y/Z_HOME_BUMP_MM to 0.
+ * M914 X/Y/Z to live tune the setting
+ */
+ //#define SENSORLESS_HOMING // TMC2130 only
+
+ #if ENABLED(SENSORLESS_HOMING)
+ #define X_HOMING_SENSITIVITY 8
+ #define Y_HOMING_SENSITIVITY 8
+ #define Z_HOMING_SENSITIVITY 8
+ #endif
+
+ /**
+ * Enable M122 debugging command for TMC stepper drivers.
+ * M122 S0/1 will enable continous reporting.
+ */
+ //#define TMC_DEBUG
+
+ /**
+ * M915 Z Axis Calibration
+ *
+ * - Adjust Z stepper current,
+ * - Drive the Z axis to its physical maximum, and
+ * - Home Z to account for the lost steps.
+ *
+ * Use M915 Snn to specify the current.
+ * Use M925 Znn to add extra Z height to Z_MAX_POS.
+ */
+ //#define TMC_Z_CALIBRATION
+ #if ENABLED(TMC_Z_CALIBRATION)
+ #define CALIBRATION_CURRENT 250
+ #define CALIBRATION_EXTRA_HEIGHT 10
+ #endif
+
+ /**
+ * You can set your own advanced settings by filling in predefined functions.
+ * A list of available functions can be found on the library github page
+ * https://github.com/teemuatlut/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // TMC2130 || TMC2208
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ */
+#if HAS_DRIVER(L6470)
+
+ #define X_MICROSTEPS 16 // number of microsteps
+ #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
+ #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+
+ #define X2_MICROSTEPS 16
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+
+ #define Y_MICROSTEPS 16
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+
+ #define Y2_MICROSTEPS 16
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+
+ #define Z_MICROSTEPS 16
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+
+ #define Z2_MICROSTEPS 16
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+
+ #define E0_MICROSTEPS 16
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+
+ #define E1_MICROSTEPS 16
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+
+ #define E2_MICROSTEPS 16
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+
+ #define E3_MICROSTEPS 16
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+
+ #define E4_MICROSTEPS 16
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for PLA"
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for ABS"
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Specify an action command to send to the host when the printer is killed.
+ * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_KILL "poweroff"
+
+/**
+ * Specify an action command to send to the host on pause and resume.
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_PAUSE "pause"
+//#define ACTION_ON_RESUME "resume"
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reilabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
+#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
new file mode 100644
index 000000000000..b07e556582eb
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
@@ -0,0 +1,1953 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#ifndef CONFIGURATION_H
+#define CONFIGURATION_H
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// 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
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(Phr3d13, default config)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * 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.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_GT2560_REV_A_PLUS
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Pro W"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
+#endif
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+#if ENABLED(PARKING_EXTRUDER)
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds a new code, M165, to set the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 32.00} // (in mm) for each extruder, offset of the hotend on the X axis
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // Ultimaker
+ #define DEFAULT_Kp 22.2
+ #define DEFAULT_Ki 1.08
+ #define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * heater. If your configuration is significantly different than this and you don't understand
+ * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ */
+//#define PIDTEMPBED
+
+//#define BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * 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! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 200
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= Mechanical Settings =========================
+//===========================================================================
+
+// @section machine
+
+// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
+// either in the usual order or reversed
+//#define COREXY
+//#define COREXZ
+//#define COREYZ
+//#define COREYX
+//#define COREZX
+//#define COREZY
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// 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).
+#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * Default Axis Steps Per Unit (steps/mm)
+ * Override with M92
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 2560, 95 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
+
+/**
+ * Default Max Acceleration (change/s) change = mm/s
+ * (Maximum start speed for accelerated moves)
+ * Override with M201
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#define DEFAULT_XJERK 10.0
+#define DEFAULT_YJERK 10.0
+#define DEFAULT_ZJERK 0.3
+#define DEFAULT_EJERK 5.0
+
+/**
+ * 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 =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#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.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // 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
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR true
+#define INVERT_Y_DIR true
+#define INVERT_Z_DIR false
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR true
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 200
+#define Y_BED_SIZE 200
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS 0
+#define Y_MIN_POS 0
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 180
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * 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 MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// Manually set the home position. Leave these undefined for automatic settings.
+// For DELTA this is the top-center of the Cartesian print volume.
+//#define MANUAL_X_HOME_POS 0
+//#define MANUAL_Y_HOME_POS 0
+//#define MANUAL_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_TEMP_HOTEND 200
+#define PREHEAT_1_TEMP_BED 65
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_TEMP_HOTEND 235
+#define PREHEAT_2_TEMP_BED 95
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * P1 Raise the nozzle always to Z-park height.
+ * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
+ */
+#define NOZZLE_PARK_FEATURE
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * 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.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://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.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// 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/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// 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: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a 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 ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#endif // CONFIGURATION_H
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
new file mode 100644
index 000000000000..18a7483cbc2a
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
@@ -0,0 +1,1681 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#ifndef CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// When first starting the main fan, run it at full speed for the
+// given number of milliseconds. This gets the fan spinning reliably
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
+//#define FAN_KICKSTART_TIME 100
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * Multiple extruders can be assigned to the same pin in which case
+ * the fan will turn on when any selected extruder is above the threshold.
+ */
+#define E0_AUTO_FAN_PIN -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
+ #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
+ #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
+ #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
+ //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
+ //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
+ #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+// Enable this for dual x-carriage printers.
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ // Configuration for second X-carriage
+ // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
+ // the second x-carriage always homes to the maximum endstop.
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+
+ // There are a few selectable movement modes for dual x-carriages using M605 S
+ // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ // as long as it supports dual x-carriages. (M605 S0)
+ // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ // that additional slicer support is not required. (M605 S1)
+ // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+
+ // Default settings in "Auto-park Mode"
+ #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
+ #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
+#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
+#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+
+//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
+
+// @section lcd
+
+// Include a page of printer information in the LCD Main Menu
+#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ #define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ #define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if ENABLED(DOGLCD)
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ #if ENABLED(U8GLIB_ST7920)
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+#endif // DOGLCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+ //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
+ * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ */
+#define LIN_ADVANCE
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// The number of linear motions that can be in the plan at any give time.
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
+#if ENABLED(SDSUPPORT)
+ #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// @section extras
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT // ONLY PARTIALLY TESTED
+#if ENABLED(FWRETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZLIFT 0 // Default retract Z-lift
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+#endif
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+#define ADVANCED_PAUSE_FEATURE
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #define X_MAX_CURRENT 1000 // in mA
+ #define X_SENSE_RESISTOR 91 // in mOhms
+ #define X_MICROSTEPS 16 // number of microsteps
+
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
+ * the hardware SPI interface on your board and define the required CS pins
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
+ * to PDN_UART without a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
+ */
+#if HAS_TRINAMIC
+
+ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
+ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
+ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
+
+ #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+
+ /**
+ * Use software SPI for TMC2130.
+ * The default SW SPI pins are defined the respective pins files,
+ * but you can override or define them here.
+ */
+ //#define TMC_USE_SW_SPI
+ //#define TMC_SW_MOSI -1
+ //#define TMC_SW_MISO -1
+ //#define TMC_SW_SCK -1
+
+ /**
+ * Use Trinamic's ultra quiet stepping mode.
+ * When disabled, Marlin will use spreadCycle stepping mode.
+ */
+ #define STEALTHCHOP
+
+ /**
+ * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * like overtemperature and short to ground. TMC2208 requires hardware serial.
+ * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * M911 - Report stepper driver overtemperature pre-warn condition.
+ * M912 - Clear stepper driver overtemperature pre-warn condition flag.
+ * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
+ */
+ //#define MONITOR_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_DRIVER_STATUS)
+ #define CURRENT_STEP_DOWN 50 // [mA]
+ #define REPORT_CURRENT_CHANGE
+ #define STOP_ON_ERROR
+ #endif
+
+ /**
+ * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
+ * This mode allows for faster movements at the expense of higher noise levels.
+ * STEALTHCHOP needs to be enabled.
+ * M913 X/Y/Z/E to live tune the setting
+ */
+ //#define HYBRID_THRESHOLD
+
+ #define X_HYBRID_THRESHOLD 100 // [mm/s]
+ #define X2_HYBRID_THRESHOLD 100
+ #define Y_HYBRID_THRESHOLD 100
+ #define Y2_HYBRID_THRESHOLD 100
+ #define Z_HYBRID_THRESHOLD 3
+ #define Z2_HYBRID_THRESHOLD 3
+ #define E0_HYBRID_THRESHOLD 30
+ #define E1_HYBRID_THRESHOLD 30
+ #define E2_HYBRID_THRESHOLD 30
+ #define E3_HYBRID_THRESHOLD 30
+ #define E4_HYBRID_THRESHOLD 30
+
+ /**
+ * Use stallGuard2 to sense an obstacle and trigger an endstop.
+ * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
+ * X, Y, and Z homing will always be done in spreadCycle mode.
+ *
+ * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * Higher values make the system LESS sensitive.
+ * Lower value make the system MORE sensitive.
+ * Too low values can lead to false positives, while too high values will collide the axis without triggering.
+ * It is advised to set X/Y/Z_HOME_BUMP_MM to 0.
+ * M914 X/Y/Z to live tune the setting
+ */
+ //#define SENSORLESS_HOMING // TMC2130 only
+
+ #if ENABLED(SENSORLESS_HOMING)
+ #define X_HOMING_SENSITIVITY 8
+ #define Y_HOMING_SENSITIVITY 8
+ #define Z_HOMING_SENSITIVITY 8
+ #endif
+
+ /**
+ * Enable M122 debugging command for TMC stepper drivers.
+ * M122 S0/1 will enable continous reporting.
+ */
+ //#define TMC_DEBUG
+
+ /**
+ * M915 Z Axis Calibration
+ *
+ * - Adjust Z stepper current,
+ * - Drive the Z axis to its physical maximum, and
+ * - Home Z to account for the lost steps.
+ *
+ * Use M915 Snn to specify the current.
+ * Use M925 Znn to add extra Z height to Z_MAX_POS.
+ */
+ //#define TMC_Z_CALIBRATION
+ #if ENABLED(TMC_Z_CALIBRATION)
+ #define CALIBRATION_CURRENT 250
+ #define CALIBRATION_EXTRA_HEIGHT 10
+ #endif
+
+ /**
+ * You can set your own advanced settings by filling in predefined functions.
+ * A list of available functions can be found on the library github page
+ * https://github.com/teemuatlut/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // TMC2130 || TMC2208
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ */
+#if HAS_DRIVER(L6470)
+
+ #define X_MICROSTEPS 16 // number of microsteps
+ #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
+ #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+
+ #define X2_MICROSTEPS 16
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+
+ #define Y_MICROSTEPS 16
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+
+ #define Y2_MICROSTEPS 16
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+
+ #define Z_MICROSTEPS 16
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+
+ #define Z2_MICROSTEPS 16
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+
+ #define E0_MICROSTEPS 16
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+
+ #define E1_MICROSTEPS 16
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+
+ #define E2_MICROSTEPS 16
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+
+ #define E3_MICROSTEPS 16
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+
+ #define E4_MICROSTEPS 16
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for PLA"
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for ABS"
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Specify an action command to send to the host when the printer is killed.
+ * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_KILL "poweroff"
+
+/**
+ * Specify an action command to send to the host on pause and resume.
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_PAUSE "pause"
+//#define ACTION_ON_RESUME "resume"
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reilabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
+#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
index 776e4d78b815..a18577f838e9 100644
--- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
+++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -450,15 +452,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -540,18 +547,35 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#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.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -620,15 +644,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -680,6 +703,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -709,6 +733,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -752,10 +779,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -779,6 +806,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -817,9 +845,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -883,6 +908,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1061,8 +1090,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1074,6 +1103,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1347,11 +1381,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1379,19 +1412,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1418,6 +1438,15 @@
*/
#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
//
@@ -1482,12 +1511,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1511,40 +1546,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1553,28 +1554,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1582,39 +1561,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1661,6 +1629,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1681,25 +1726,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1715,6 +1746,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1736,6 +1774,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1795,7 +1861,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
index 4da8e3b6cc0f..49f8c2b2cae3 100644
--- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
+++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h
index fdba3bbea7eb..28d1eaa8319b 100644
--- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h
+++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h
@@ -92,7 +92,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -119,7 +119,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -273,6 +273,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -282,6 +283,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -313,14 +315,14 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 15 // manual calibration of thermistor in JGAurora A5 hotend
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
-#define TEMP_SENSOR_BED 1 // measured to be satisfactorily accurate on centre of bed within +/- 1 degC.
+#define TEMP_SENSOR_BED 1 // measured to be satisfactorily accurate on center of bed within +/- 1 degC.
#define TEMP_SENSOR_CHAMBER 0
// Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -458,15 +460,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 1000
@@ -548,18 +555,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -628,15 +675,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -688,6 +734,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -717,6 +764,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -760,10 +810,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -787,6 +837,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -825,9 +876,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -891,6 +939,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1068,8 +1120,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
#define LCD_BED_LEVELING
@@ -1081,6 +1133,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1354,11 +1411,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1386,19 +1442,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1425,6 +1468,15 @@
*/
//#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
//
@@ -1489,12 +1541,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1518,40 +1576,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1560,28 +1584,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1589,39 +1591,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1668,6 +1659,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1688,25 +1756,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1722,6 +1776,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1743,6 +1804,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1802,7 +1891,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
index 3e29f5b75295..26253ef14d1c 100644
--- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
+++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 6 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h
index cedbd546e223..123173c71e93 100644
--- a/Marlin/src/config/examples/MakerParts/Configuration.h
+++ b/Marlin/src/config/examples/MakerParts/Configuration.h
@@ -107,7 +107,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -134,7 +134,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 0
+//#define SERIAL_PORT_2 0
/**
* This setting determines the communication speed of the printer.
@@ -288,6 +288,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -297,6 +298,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -328,7 +330,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -466,15 +468,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -556,18 +563,35 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#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.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -608,7 +632,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_MAX_ACCELERATION { MAX_XYAXIS_ACCEL, MAX_XYAXIS_ACCEL, 100, 200 }
+#define DEFAULT_MAX_ACCELERATION { MAX_XYAXIS_ACCEL, MAX_XYAXIS_ACCEL, 10, 200 }
/**
* Default Acceleration (change/s) change = mm/s
@@ -636,15 +660,14 @@
#define DEFAULT_EJERK 8.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -696,6 +719,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -725,6 +749,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -768,10 +795,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -795,6 +822,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -833,9 +861,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -899,6 +924,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1077,8 +1106,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1090,6 +1119,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1363,13 +1397,12 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
-#define LCD_LANGUAGE es
+#define LCD_LANGUAGE en
/**
* LCD Character Set
@@ -1395,19 +1428,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1434,6 +1454,15 @@
*/
#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
//
@@ -1498,12 +1527,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1527,40 +1562,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1569,28 +1570,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1598,39 +1577,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1677,6 +1645,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1697,25 +1742,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1731,6 +1762,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1752,6 +1790,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1811,7 +1877,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h
index b6d08a3e80c9..78af6477466f 100644
--- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h
+++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -763,7 +826,7 @@
#define BEZIER_CURVE_SUPPORT
// G38.2 and G38.3 Probe Target
-// Enable PROBE_DOUBLE_TOUCH if you want G38 to double touch
+// Set MULTIPLE_PROBING if you want G38 to double touch
//#define G38_PROBE_TARGET
#if ENABLED(G38_PROBE_TARGET)
#define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
@@ -772,11 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
-#define STEPPER_DIRECTION_DELAY 2 // (µs) Delay between dir and step
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -901,61 +999,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1001,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1204,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1275,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1581,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1619,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h
index 034e2bab1496..5133bf509d0c 100644
--- a/Marlin/src/config/examples/Malyan/M150/Configuration.h
+++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h
@@ -92,7 +92,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -119,7 +119,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -273,6 +273,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -282,6 +283,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -313,7 +315,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -454,15 +456,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -545,18 +552,35 @@
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#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 endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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 endstop.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -636,15 +660,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -696,6 +719,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -725,6 +749,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -772,10 +799,10 @@
// X and Y axis travel speed (mm/m) between probes
//#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
//#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
//#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -799,6 +826,7 @@
*/
//#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
//#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -837,9 +865,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -903,6 +928,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1039,17 +1068,6 @@
#endif
-#elif ENABLED(AUTO_BED_LEVELING_3POINT)
-
- // 3 arbitrary points to probe.
- // A simple cross-product is used to estimate the plane of the bed.
- #define PROBE_PT_1_X 50
- #define PROBE_PT_1_Y 150
- #define PROBE_PT_2_X 50
- #define PROBE_PT_2_Y 50
- #define PROBE_PT_3_X 150
- #define PROBE_PT_3_Y 50
-
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1087,17 +1105,17 @@
* Override if the automatically selected points are inadequate.
*/
#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
+ #define PROBE_PT_1_X 50
+ #define PROBE_PT_1_Y 150
+ #define PROBE_PT_2_X 50
+ #define PROBE_PT_2_Y 50
+ #define PROBE_PT_3_X 150
+ #define PROBE_PT_3_Y 50
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1109,6 +1127,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1382,11 +1405,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1414,19 +1436,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1453,6 +1462,15 @@
*/
//#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
//
@@ -1517,12 +1535,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1546,40 +1570,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1588,28 +1578,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1617,39 +1585,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1696,6 +1653,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1716,25 +1750,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1750,6 +1770,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1771,6 +1798,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1830,7 +1885,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
index d0a15cd45cdd..5e55db423360 100644
--- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
+++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h
index dac1f574d273..9b3005498b65 100644
--- a/Marlin/src/config/examples/Malyan/M200/Configuration.h
+++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 11
#define TEMP_SENSOR_1 0
@@ -445,15 +447,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -535,18 +542,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -615,15 +662,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -675,6 +721,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -704,6 +751,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -747,10 +797,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -774,6 +824,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -812,9 +863,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -878,6 +926,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1056,8 +1108,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1069,6 +1121,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1342,11 +1399,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1374,19 +1430,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1413,6 +1456,15 @@
*/
//#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
//
@@ -1477,12 +1529,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1506,40 +1564,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1548,28 +1572,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1577,39 +1579,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1656,6 +1647,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1676,25 +1744,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1710,6 +1764,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1731,6 +1792,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1790,7 +1879,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
index b1b0af1914d5..4b8eadb5cd20 100644
--- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
+++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
index 3b6942b98928..098b149ee638 100644
--- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
+++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -620,15 +667,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -680,6 +726,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -709,6 +756,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -752,10 +802,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -779,6 +829,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -817,9 +868,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -883,6 +931,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1061,8 +1113,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
#define LCD_BED_LEVELING
@@ -1074,6 +1126,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1347,11 +1404,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1379,19 +1435,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1418,6 +1461,15 @@
*/
#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
//
@@ -1482,12 +1534,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1511,40 +1569,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1553,28 +1577,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1582,39 +1584,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1661,6 +1652,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1681,25 +1749,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1715,6 +1769,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1736,6 +1797,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1795,7 +1884,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
index a254db2d8602..f5b1ef7fdabd 100644
--- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
+++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -538,16 +545,33 @@
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING 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 false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -620,15 +644,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -680,6 +703,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -709,6 +733,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -752,10 +779,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -779,6 +806,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -817,9 +845,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -883,6 +908,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1061,8 +1090,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1074,6 +1103,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1347,11 +1381,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1379,19 +1412,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1418,6 +1438,15 @@
*/
#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
//
@@ -1482,12 +1511,18 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
#define LCD_FEEDBACK_FREQUENCY_HZ 1000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1511,40 +1546,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1553,28 +1554,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1582,39 +1561,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1661,6 +1629,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1681,25 +1726,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1715,6 +1746,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1736,6 +1774,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1795,7 +1861,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
index 28adbc867f3b..c6fe2c7b852d 100644
--- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
+++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Mks/Sbase/000-README_RepRap_Discount_Full_Graphic_Smart_Controller.txt b/Marlin/src/config/examples/Mks/Sbase/000-README_RepRap_Discount_Full_Graphic_Smart_Controller.txt
index e5c51b7a5cb5..1ec5e7fd7ad8 100644
--- a/Marlin/src/config/examples/Mks/Sbase/000-README_RepRap_Discount_Full_Graphic_Smart_Controller.txt
+++ b/Marlin/src/config/examples/Mks/Sbase/000-README_RepRap_Discount_Full_Graphic_Smart_Controller.txt
@@ -25,3 +25,14 @@ An octopus cable something like the Adafruit 1199 will simply the construction o
Adafruit 10-pin IDC Socket Rainbow Breakout Cable [1199]
https://www.adafruit.com/product/1199
+
+
+/////////////////////////////////////////////////////////////////////
+
+27 APR 2018
+
+If you also want a functional SD_DETECT_PIN then you'll need to also move the following pin:
+
+ used to go to P0.27 to J8-5
+
+if you decide to use a different pin then the pins_MKS_SBASE.h file will need to be modified.
diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h
index 08c6b856df57..51dff291a9c0 100644
--- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h
+++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -105,7 +105,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT 0
+#define SERIAL_PORT -1
/**
* Select a secondary serial port on the board to use for communication with the host.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 0
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -538,16 +545,33 @@
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING 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 false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +904,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@
*/
//#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
//
@@ -1478,12 +1507,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
index 50a7a6cacd74..272fc057fa86 100644
--- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
+++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -473,7 +501,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+#define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.2, 1.2, 1.2, 1.2, 1.2 } // MKS SBASE: 5
@@ -494,9 +522,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -556,6 +581,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -754,6 +793,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -780,10 +843,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 4 // (µs)
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -908,61 +1007,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1008,62 +1101,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1211,32 +1271,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1282,7 +1329,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1588,27 +1635,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1626,4 +1676,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
index 1f48ae435abf..f0217ec30a8c 100644
--- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
+++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -620,7 +667,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#define DEFAULT_MAX_Z_FEEDRATE 3.3 // older Huxley has problem with speeds > 3.3 mm/s on z axis
-#define DEFAULT_MAX_FEEDRATE { 200, 200, DEFAULT_MAX_Z_FEEDRATE, 25 }
+#define DEFAULT_MAX_FEEDRATE { 200, 200, DEFAULT_MAX_Z_FEEDRATE, 25 }
/**
* Default Max Acceleration (change/s) change = mm/s
@@ -656,15 +703,14 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -716,6 +762,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -745,6 +792,9 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -788,10 +838,10 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -815,6 +865,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -853,9 +904,6 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -928,6 +976,10 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1106,8 +1158,8 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1119,6 +1171,11 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1392,11 +1449,10 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1424,19 +1480,6 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1463,6 +1506,15 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
*/
//#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
//
@@ -1527,12 +1579,18 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1556,40 +1614,6 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1598,28 +1622,6 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1627,39 +1629,28 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1706,6 +1697,83 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1726,25 +1794,11 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1760,6 +1814,13 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1781,6 +1842,34 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1840,7 +1929,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
index e0de50780f6f..1dd0e41fe50a 100644
--- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
+++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -542,12 +549,29 @@
#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.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +904,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@
*/
#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
//
@@ -1478,12 +1507,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-#define REPRAPWORLD_KEYPAD
-#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+#define REPRAPWORLD_KEYPAD
+#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h
index 62d21fcad7a1..5379744fd608 100644
--- a/Marlin/src/config/examples/RigidBot/Configuration.h
+++ b/Marlin/src/config/examples/RigidBot/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -271,6 +271,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -280,6 +281,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -311,7 +313,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1 // DGlass3D = 5; RigidBot = 1; 3DSv6 = 5
#define TEMP_SENSOR_1 0
@@ -442,15 +444,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -538,12 +545,29 @@
#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.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -614,15 +638,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -674,6 +697,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -703,6 +727,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -746,10 +773,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -773,6 +800,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -811,9 +839,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -877,6 +902,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1055,8 +1084,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1068,6 +1097,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1341,11 +1375,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1373,19 +1406,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1412,6 +1432,15 @@
*/
//#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
//
@@ -1476,12 +1505,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1505,40 +1540,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1547,30 +1548,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-// RigidBoard: To rewire this for a RigidBot see http://rigidtalk.com/wiki/index.php?title=LCD_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1555,28 @@
#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1623,85 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+// RigidBoard: To rewire this for a RigidBot see http://rigidtalk.com/wiki/index.php?title=LCD_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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h
index 9d132923a145..2e87ca37a1cb 100644
--- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h
+++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h
index 4c14be017316..50497c9ba521 100644
--- a/Marlin/src/config/examples/SCARA/Configuration.h
+++ b/Marlin/src/config/examples/SCARA/Configuration.h
@@ -118,7 +118,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -145,7 +145,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -299,6 +299,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -308,6 +309,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -339,7 +341,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -459,15 +461,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -515,23 +522,23 @@
// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
-#define USE_XMIN_PLUG
-#define USE_YMIN_PLUG
+//#define USE_XMIN_PLUG
+//#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
-//#define USE_XMAX_PLUG
-//#define USE_YMAX_PLUG
+#define USE_XMAX_PLUG
+#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
// Enable pullup for all endstops to prevent a floating state
//#define ENDSTOPPULLUPS
#if DISABLED(ENDSTOPPULLUPS)
// Disable ENDSTOPPULLUPS to set pullups individually
- //#define ENDSTOPPULLUP_XMAX
- //#define ENDSTOPPULLUP_YMAX
- #define ENDSTOPPULLUP_ZMAX // open pin, inverted
- #define ENDSTOPPULLUP_XMIN // open pin, inverted
- #define ENDSTOPPULLUP_YMIN // open pin, inverted
- //#define ENDSTOPPULLUP_ZMIN
+ #define ENDSTOPPULLUP_XMAX
+ #define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX // open pin, inverted
+ //#define ENDSTOPPULLUP_XMIN // open pin, inverted
+ //#define ENDSTOPPULLUP_YMIN // open pin, inverted
+ #define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_ZMIN_PROBE
#endif
@@ -555,12 +562,29 @@
#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.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -629,15 +653,14 @@
#define DEFAULT_EJERK 3.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -689,6 +712,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -718,6 +742,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -761,10 +788,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -788,6 +815,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -826,9 +854,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -892,6 +917,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1070,8 +1099,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1083,6 +1112,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1356,11 +1390,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1388,19 +1421,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1427,6 +1447,15 @@
*/
//#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
//
@@ -1491,12 +1520,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1520,40 +1555,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1562,28 +1563,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1591,39 +1570,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1670,6 +1638,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1690,25 +1735,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1724,6 +1755,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1745,6 +1783,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1804,7 +1870,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h
index e40e1ae580dc..95cd966b242f 100644
--- a/Marlin/src/config/examples/SCARA/Configuration_adv.h
+++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h
index ed00628c0c31..76efc90bb987 100644
--- a/Marlin/src/config/examples/STM32F10/Configuration.h
+++ b/Marlin/src/config/examples/STM32F10/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#warning temp_sensor set to 998/999 (fake)
#define TEMP_SENSOR_0 999
@@ -447,15 +449,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -541,15 +548,55 @@
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define X_MAX_ENDSTOP_INVERTING 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 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 false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -617,17 +664,15 @@
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
-
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -679,6 +724,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -708,6 +754,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -751,10 +800,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -778,6 +827,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -816,9 +866,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -882,6 +929,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1060,8 +1111,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1073,6 +1124,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1346,11 +1402,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1378,19 +1433,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1417,6 +1459,15 @@
*/
//#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
//
@@ -1481,12 +1532,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1510,40 +1567,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1552,28 +1575,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1581,39 +1582,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1660,6 +1650,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1680,25 +1747,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1714,6 +1767,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1735,6 +1795,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1794,7 +1882,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h
new file mode 100644
index 000000000000..00fb09416b98
--- /dev/null
+++ b/Marlin/src/config/examples/STM32F4/Configuration.h
@@ -0,0 +1,1953 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#ifndef CONFIGURATION_H
+#define CONFIGURATION_H
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// 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
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-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.
+ * 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.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+////#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_STM32F4
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+//#define CUSTOM_MACHINE_NAME "3D Printer"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
+#endif
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+#if ENABLED(PARKING_EXTRUDER)
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds a new code, M165, to set the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_BED 0
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // Ultimaker
+ #define DEFAULT_Kp 22.2
+ #define DEFAULT_Ki 1.08
+ #define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * heater. If your configuration is significantly different than this and you don't understand
+ * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ */
+//#define PIDTEMPBED
+
+//#define BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * 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! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 200
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= Mechanical Settings =========================
+//===========================================================================
+
+// @section machine
+
+// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
+// either in the usual order or reversed
+//#define COREXY
+//#define COREXZ
+//#define COREYZ
+//#define COREYX
+//#define COREZX
+//#define COREZY
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// 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).
+#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * Default Axis Steps Per Unit (steps/mm)
+ * Override with M92
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
+
+/**
+ * Default Max Acceleration (change/s) change = mm/s
+ * (Maximum start speed for accelerated moves)
+ * Override with M201
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#define DEFAULT_XJERK 10.0
+#define DEFAULT_YJERK 10.0
+#define DEFAULT_ZJERK 0.3
+#define DEFAULT_EJERK 5.0
+
+/**
+ * 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 =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#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.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // 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
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR false
+#define INVERT_Y_DIR true
+#define INVERT_Z_DIR false
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR false
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 200
+#define Y_BED_SIZE 200
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS 0
+#define Y_MIN_POS 0
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 200
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * 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 MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// Manually set the home position. Leave these undefined for automatic settings.
+// For DELTA this is the top-center of the Cartesian print volume.
+//#define MANUAL_X_HOME_POS 0
+//#define MANUAL_Y_HOME_POS 0
+//#define MANUAL_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_TEMP_HOTEND 180
+#define PREHEAT_1_TEMP_BED 70
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 110
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * P1 Raise the nozzle always to Z-park height.
+ * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
+ */
+//#define NOZZLE_PARK_FEATURE
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+//#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * 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.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+//#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://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.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// 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/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// 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: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a 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 ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#endif // CONFIGURATION_H
diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h
index f0de939a66a7..a8ec8b1df994 100644
--- a/Marlin/src/config/examples/Sanguinololu/Configuration.h
+++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -647,15 +694,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -707,6 +753,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -736,6 +783,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -779,10 +829,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -806,6 +856,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -844,9 +895,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -910,6 +958,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1088,8 +1140,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1101,6 +1153,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1374,11 +1431,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1406,19 +1462,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1445,6 +1488,15 @@
*/
//#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
//
@@ -1509,12 +1561,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1538,40 +1596,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1580,28 +1604,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1609,39 +1611,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1688,6 +1679,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1708,25 +1776,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1742,6 +1796,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1763,6 +1824,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1822,7 +1911,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
index 57aef8ac50ed..60aeebe4aa5d 100644
--- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
+++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h
index 015c685c2cca..8da6fa860e32 100644
--- a/Marlin/src/config/examples/TheBorg/Configuration.h
+++ b/Marlin/src/config/examples/TheBorg/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 5
+//#define SERIAL_PORT_2 5
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -536,18 +543,35 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#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.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +904,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@
*/
//#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
//
@@ -1478,12 +1507,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h
index b8384ca71c5e..0057e1e7220a 100644
--- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h
+++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,163 +999,123 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-#define HAVE_TMC26X
-
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- #define X_IS_TMC26X
- //#define X2_IS_TMC26X
- #define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- #define Z_IS_TMC26X
- #define Z2_IS_TMC26X
- #define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
-
- #define X_MAX_CURRENT 1200 // in mA
- #define X_SENSE_RESISTOR 50 // in mOhms
- #define X_MICROSTEPS 32 // number of microsteps
-
- #define X2_MAX_CURRENT 1200
- #define X2_SENSE_RESISTOR 50
- #define X2_MICROSTEPS 32
-
- #define Y_MAX_CURRENT 1200
- #define Y_SENSE_RESISTOR 50
- #define Y_MICROSTEPS 32
-
- #define Y2_MAX_CURRENT 1200
- #define Y2_SENSE_RESISTOR 50
- #define Y2_MICROSTEPS 32
-
- #define Z_MAX_CURRENT 1200
- #define Z_SENSE_RESISTOR 50
- #define Z_MICROSTEPS 32
-
- #define Z2_MAX_CURRENT 1200
- #define Z2_SENSE_RESISTOR 50
- #define Z2_MICROSTEPS 32
-
- #define E0_MAX_CURRENT 1200
- #define E0_SENSE_RESISTOR 50
- #define E0_MICROSTEPS 32
-
- #define E1_MAX_CURRENT 1200
- #define E1_SENSE_RESISTOR 50
- #define E1_MICROSTEPS 32
-
- #define E2_MAX_CURRENT 1200
- #define E2_SENSE_RESISTOR 50
- #define E2_MICROSTEPS 32
-
- #define E3_MAX_CURRENT 1200
- #define E3_SENSE_RESISTOR 50
- #define E3_MICROSTEPS 32
-
- #define E4_MAX_CURRENT 1200
- #define E4_SENSE_RESISTOR 50
- #define E4_MICROSTEPS 32
+#if HAS_DRIVER(TMC26X)
-#endif
+ #define X_MAX_CURRENT 1000 // in mA
+ #define X_SENSE_RESISTOR 91 // in mOhms
+ #define X_MICROSTEPS 16 // number of microsteps
+
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1204,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1275,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1581,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1619,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h
index 3e6a8c5d6a71..5b9e13ea0312 100644
--- a/Marlin/src/config/examples/TinyBoy2/Configuration.h
+++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h
@@ -103,7 +103,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -130,7 +130,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -290,6 +290,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -299,6 +300,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -330,7 +332,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -496,15 +498,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -588,16 +595,56 @@
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING 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_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 false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
//=============================================================================
//============================== Movement Settings ============================
@@ -667,15 +714,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -727,6 +773,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -756,6 +803,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -799,10 +849,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -826,6 +876,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -864,9 +915,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba steppers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -935,6 +983,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1113,8 +1165,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1126,6 +1178,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1399,11 +1456,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1431,19 +1487,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1470,6 +1513,15 @@
*/
#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
//
@@ -1534,12 +1586,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1563,40 +1621,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1605,28 +1629,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1634,39 +1636,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1713,6 +1704,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1733,25 +1801,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1767,6 +1821,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1788,6 +1849,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1847,7 +1936,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
index b98980310d3c..e0b9ad5573d7 100644
--- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
+++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h
index 4cd2255acb72..759178b03388 100644
--- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 11
#define TEMP_SENSOR_1 0
@@ -366,7 +368,7 @@
#define PIDTEMP
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
-#define PID_K1 0.95 // Smoothing factor within the PID
+#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -536,18 +543,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -968,7 +1020,7 @@
/**
* Enable the G26 Mesh Validation Pattern tool.
*/
- #define G26_MESH_VALIDATION // Enable G26 mesh validation
+ #define G26_MESH_VALIDATION
#if ENABLED(G26_MESH_VALIDATION)
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h
new file mode 100644
index 000000000000..c6c64da3e4b8
--- /dev/null
+++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h
@@ -0,0 +1,1935 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#ifndef CONFIGURATION_H
+#define CONFIGURATION_H
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// 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
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(Schullebernd, Tronxy X3A)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * 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.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_MELZI //63
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Tronxy X3A"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
+#endif
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+#if ENABLED(PARKING_EXTRUDER)
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds a new code, M165, to set the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
+ * - This implementation supports only a single extruder.
+ * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 6
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_BED 501
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define BED_MAXTEMP 130
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // Ultimaker
+ #define DEFAULT_Kp 22.2
+ #define DEFAULT_Ki 1.08
+ #define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * heater. If your configuration is significantly different than this and you don't understand
+ * the issues involved, don't use bed PID until someone else verifies that your hardware works.
+ */
+//#define PIDTEMPBED
+
+#define BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
+ #define DEFAULT_bedKp 10.00
+ #define DEFAULT_bedKi .023
+ #define DEFAULT_bedKd 305.4
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * 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! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 210
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= Mechanical Settings =========================
+//===========================================================================
+
+// @section machine
+
+// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
+// either in the usual order or reversed
+//#define COREXY
+//#define COREXZ
+//#define COREYZ
+//#define COREYX
+//#define COREZX
+//#define COREZY
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// 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).
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+
+// Enable this feature if all enabled endstop pins are interrupt-capable.
+// This will remove the need to poll the interrupt pins, saving many CPU cycles.
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * Default Axis Steps Per Unit (steps/mm)
+ * Override with M92
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 400, 90 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 400, 400, 4, 50 }
+
+/**
+ * Default Max Acceleration (change/s) change = mm/s
+ * (Maximum start speed for accelerated moves)
+ * Override with M201
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ */
+#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 1500, 5000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#define DEFAULT_XJERK 15.0
+#define DEFAULT_YJERK 15.0
+#define DEFAULT_ZJERK 0.4
+#define DEFAULT_EJERK 5.0
+
+/**
+ * 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 =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#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.)
+ */
+#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER -32 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.5 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 50
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 6000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
+#define Z_AFTER_PROBING 5 // Z position after probing is done
+
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+
+// For M851 give a range for adjusting the Z probe offset
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR false
+#define INVERT_Y_DIR false
+#define INVERT_Z_DIR true
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR false
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 220
+#define Y_BED_SIZE 220
+
+// Tronxy X3A specific offsets
+#define TRONXY_X_BED_OFFSET -17
+#define TRONXY_Y_BED_OFFSET -25
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS TRONXY_X_BED_OFFSET
+#define Y_MIN_POS TRONXY_Y_BED_OFFSET
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE - (2 * TRONXY_X_BED_OFFSET)
+#define Y_MAX_POS Y_BED_SIZE - (TRONXY_Y_BED_OFFSET + 5)
+#define Z_MAX_POS 316
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * 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 MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// Manually set the home position. Leave these undefined for automatic settings.
+// For DELTA this is the top-center of the Cartesian print volume.
+#define MANUAL_X_HOME_POS TRONXY_X_BED_OFFSET // The X3A has a standard X offset (17mm) between the left endstop and bed left bed edge
+#define MANUAL_Y_HOME_POS TRONXY_Y_BED_OFFSET // The X3A has a standard Y offset (25mm) between the y endstop and the front bet edge
+#define MANUAL_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (100*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_TEMP_HOTEND 210
+#define PREHEAT_1_TEMP_BED 60
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_TEMP_HOTEND 225
+#define PREHEAT_2_TEMP_BED 85
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * P1 Raise the nozzle always to Z-park height.
+ * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
+ */
+//#define NOZZLE_PARK_FEATURE
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr,
+ * gl, hr, it, jp-kana, nl, pl, pt, pt-br, ru, sk,
+ * tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * 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.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+//#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://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.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// 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/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// 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: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * as the Arduino cannot handle the current the LEDs will require.
+ * Failure to follow this precaution can destroy your Arduino!
+ * NOTE: A separate 5V power supply is required! The Neopixel LED needs
+ * more current than the Arduino 5V linear regulator can produce.
+ * *** CAUTION ***
+ *
+ * LED Type. Enable only one of the following two options.
+ *
+ */
+//#define RGB_LED
+//#define RGBW_LED
+
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Servo deactivation
+//
+// With this option servos are powered only during movement, then turned off to prevent jitter.
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+#endif // CONFIGURATION_H
diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
new file mode 100644
index 000000000000..8b72335a0d28
--- /dev/null
+++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
@@ -0,0 +1,1683 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#ifndef CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 40 // Seconds
+ #define WATCH_TEMP_INCREASE 10 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 10 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// When first starting the main fan, run it at full speed for the
+// given number of milliseconds. This gets the fan spinning reliably
+// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
+//#define FAN_KICKSTART_TIME 100
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * Multiple extruders can be assigned to the same pin in which case
+ * the fan will turn on when any selected extruder is above the threshold.
+ */
+#define E0_AUTO_FAN_PIN -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
+ #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
+ #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
+ #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
+ //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu
+ //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
+ #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+// Enable this for dual x-carriage printers.
+// A dual x-carriage design has the advantage that the inactive extruder can be parked which
+// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage
+// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug.
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ // Configuration for second X-carriage
+ // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
+ // the second x-carriage always homes to the maximum endstop.
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+
+ // There are a few selectable movement modes for dual x-carriages using M605 S
+ // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ // as long as it supports dual x-carriages. (M605 S0)
+ // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ // that additional slicer support is not required. (M605 S1)
+ // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+
+ // Default settings in "Auto-park Mode"
+ #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
+ #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
+#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
+#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
+
+//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
+
+// @section lcd
+
+// Include a page of printer information in the LCD Main Menu
+//#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+//#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ //#define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if ENABLED(DOGLCD)
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ #if ENABLED(U8GLIB_ST7920)
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+#endif // DOGLCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+//#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+ //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
+ * Mention @Sebastianv650 on GitHub to alert the author of any issues.
+ */
+//#define LIN_ADVANCE
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// The number of linear motions that can be in the plan at any give time.
+// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
+#if ENABLED(SDSUPPORT)
+ #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// @section extras
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT // ONLY PARTIALLY TESTED
+#if ENABLED(FWRETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZLIFT 0 // Default retract Z-lift
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+#endif
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+//#define ADVANCED_PAUSE_FEATURE
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #define X_MAX_CURRENT 1000 // in mA
+ #define X_SENSE_RESISTOR 91 // in mOhms
+ #define X_MICROSTEPS 16 // number of microsteps
+
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
+ * the hardware SPI interface on your board and define the required CS pins
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN
+ * to PDN_UART without a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
+ */
+#if HAS_TRINAMIC
+
+ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
+ #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
+ #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
+
+ #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+
+ /**
+ * Use software SPI for TMC2130.
+ * The default SW SPI pins are defined the respective pins files,
+ * but you can override or define them here.
+ */
+ //#define TMC_USE_SW_SPI
+ //#define TMC_SW_MOSI -1
+ //#define TMC_SW_MISO -1
+ //#define TMC_SW_SCK -1
+
+ /**
+ * Use Trinamic's ultra quiet stepping mode.
+ * When disabled, Marlin will use spreadCycle stepping mode.
+ */
+ #define STEALTHCHOP
+
+ /**
+ * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * like overtemperature and short to ground. TMC2208 requires hardware serial.
+ * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * M911 - Report stepper driver overtemperature pre-warn condition.
+ * M912 - Clear stepper driver overtemperature pre-warn condition flag.
+ * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG)
+ */
+ //#define MONITOR_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_DRIVER_STATUS)
+ #define CURRENT_STEP_DOWN 50 // [mA]
+ #define REPORT_CURRENT_CHANGE
+ #define STOP_ON_ERROR
+ #endif
+
+ /**
+ * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
+ * This mode allows for faster movements at the expense of higher noise levels.
+ * STEALTHCHOP needs to be enabled.
+ * M913 X/Y/Z/E to live tune the setting
+ */
+ //#define HYBRID_THRESHOLD
+
+ #define X_HYBRID_THRESHOLD 100 // [mm/s]
+ #define X2_HYBRID_THRESHOLD 100
+ #define Y_HYBRID_THRESHOLD 100
+ #define Y2_HYBRID_THRESHOLD 100
+ #define Z_HYBRID_THRESHOLD 3
+ #define Z2_HYBRID_THRESHOLD 3
+ #define E0_HYBRID_THRESHOLD 30
+ #define E1_HYBRID_THRESHOLD 30
+ #define E2_HYBRID_THRESHOLD 30
+ #define E3_HYBRID_THRESHOLD 30
+ #define E4_HYBRID_THRESHOLD 30
+
+ /**
+ * Use stallGuard2 to sense an obstacle and trigger an endstop.
+ * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
+ * X, Y, and Z homing will always be done in spreadCycle mode.
+ *
+ * X/Y/Z_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * Higher values make the system LESS sensitive.
+ * Lower value make the system MORE sensitive.
+ * Too low values can lead to false positives, while too high values will collide the axis without triggering.
+ * It is advised to set X/Y/Z_HOME_BUMP_MM to 0.
+ * M914 X/Y/Z to live tune the setting
+ */
+ //#define SENSORLESS_HOMING // TMC2130 only
+
+ #if ENABLED(SENSORLESS_HOMING)
+ #define X_HOMING_SENSITIVITY 8
+ #define Y_HOMING_SENSITIVITY 8
+ #define Z_HOMING_SENSITIVITY 8
+ #endif
+
+ /**
+ * Enable M122 debugging command for TMC stepper drivers.
+ * M122 S0/1 will enable continous reporting.
+ */
+ //#define TMC_DEBUG
+
+ /**
+ * M915 Z Axis Calibration
+ *
+ * - Adjust Z stepper current,
+ * - Drive the Z axis to its physical maximum, and
+ * - Home Z to account for the lost steps.
+ *
+ * Use M915 Snn to specify the current.
+ * Use M925 Znn to add extra Z height to Z_MAX_POS.
+ */
+ //#define TMC_Z_CALIBRATION
+ #if ENABLED(TMC_Z_CALIBRATION)
+ #define CALIBRATION_CURRENT 250
+ #define CALIBRATION_EXTRA_HEIGHT 10
+ #endif
+
+ /**
+ * You can set your own advanced settings by filling in predefined functions.
+ * A list of available functions can be found on the library github page
+ * https://github.com/teemuatlut/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // TMC2130 || TMC2208
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ */
+#if HAS_DRIVER(L6470)
+
+ #define X_MICROSTEPS 16 // number of microsteps
+ #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
+ #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+
+ #define X2_MICROSTEPS 16
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+
+ #define Y_MICROSTEPS 16
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+
+ #define Y2_MICROSTEPS 16
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+
+ #define Z_MICROSTEPS 16
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+
+ #define Z2_MICROSTEPS 16
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+
+ #define E0_MICROSTEPS 16
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+
+ #define E1_MICROSTEPS 16
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+
+ #define E2_MICROSTEPS 16
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+
+ #define E3_MICROSTEPS 16
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+
+ #define E4_MICROSTEPS 16
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for PLA"
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for ABS"
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Specify an action command to send to the host when the printer is killed.
+ * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_KILL "poweroff"
+
+/**
+ * Specify an action command to send to the host on pause and resume.
+ * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
+ * The host must be configured to handle the action command.
+ */
+//#define ACTION_ON_PAUSE "pause"
+//#define ACTION_ON_RESUME "resume"
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reilabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
+#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
index 291d7fdf955f..46ad95f9a01a 100644
--- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 600
@@ -536,18 +543,35 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#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.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#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.
// 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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +904,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1100,8 +1134,8 @@
#define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING)
- #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
- #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
#endif
// Homing speeds (mm/m)
@@ -1343,11 +1377,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@
*/
//#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
//
@@ -1478,12 +1507,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
index 6fee980eb5ad..3d19372b3ca8 100644
--- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -457,15 +459,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -547,18 +554,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -627,15 +674,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -687,6 +733,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -716,6 +763,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -759,10 +809,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -786,6 +836,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -824,9 +875,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -890,6 +938,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1068,8 +1120,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1081,6 +1133,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1354,11 +1411,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1386,19 +1442,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1425,6 +1468,15 @@
*/
//#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
//
@@ -1489,12 +1541,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1518,40 +1576,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1560,28 +1584,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1589,39 +1591,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1668,6 +1659,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1688,25 +1756,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1722,6 +1776,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1743,6 +1804,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1802,7 +1891,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
index c357c13a7ea4..34b0e60cfd3b 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
+ */
+#define X_DRIVER_TYPE TMC2130
+#define Y_DRIVER_TYPE TMC2130
+#define Z_DRIVER_TYPE TMC2130
+//#define X2_DRIVER_TYPE A4988
+//#define Y2_DRIVER_TYPE A4988
+//#define Z2_DRIVER_TYPE A4988
+#define E0_DRIVER_TYPE TMC2130
+//#define E1_DRIVER_TYPE A4988
+//#define E2_DRIVER_TYPE A4988
+//#define E3_DRIVER_TYPE A4988
+//#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1565,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1573,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1580,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1648,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1745,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1765,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1793,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1880,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
index 2988ceeb8dc0..cc818c17496d 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h
index 0e92c34d36bf..97215c9b15cc 100644
--- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h
@@ -103,7 +103,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -130,7 +130,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -288,6 +288,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -297,6 +298,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -328,7 +330,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -476,15 +478,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -574,10 +581,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -645,15 +692,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -705,6 +751,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -734,6 +781,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -777,10 +827,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -804,6 +854,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -842,9 +893,6 @@
#define INVERT_Y_DIR false // K8200: false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -909,6 +957,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1087,8 +1139,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1100,6 +1152,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1376,11 +1433,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1408,19 +1464,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE // K8200: for Display VM8201 // this is the most common hardware
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1447,6 +1490,15 @@
*/
#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
//
@@ -1511,12 +1563,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1540,40 +1598,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1582,28 +1606,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1611,39 +1613,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1690,6 +1681,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1710,25 +1778,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1744,6 +1798,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1767,6 +1828,34 @@
#endif // K8200_VM8201
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1826,7 +1915,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
index 2124fc4385b5..19da7a3e6221 100644
--- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
+++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
@@ -195,10 +195,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -442,8 +444,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -485,7 +503,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -506,9 +524,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -568,6 +583,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -759,6 +788,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -785,10 +838,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -913,61 +1002,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1013,62 +1096,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1216,32 +1266,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1287,7 +1324,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1593,27 +1630,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1631,4 +1671,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h
index 4b4be502eb08..cf35acc3885f 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -548,6 +555,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@
#define DEFAULT_EJERK 20.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -844,11 +869,11 @@
// The size of the print bed
#define X_BED_SIZE 200
-#define Y_BED_SIZE 200
+#define Y_BED_SIZE 180
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
-#define Y_MIN_POS 20
+#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
@@ -879,6 +904,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@
*/
//#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
//
@@ -1478,12 +1507,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
@@ -1801,13 +1867,14 @@
* LED Type. Enable only one of the following two options.
*
*/
-//#define RGB_LED
+//#define RGB_LED // Enable for the Velleman RGB LED Add-on. https://www.velleman.eu/products/view/?id=430100
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
- #define RGB_LED_R_PIN 34
- #define RGB_LED_G_PIN 43
- #define RGB_LED_B_PIN 35
+ // Pin defines for the RGB LED Add-on.
+ #define RGB_LED_R_PIN 41
+ #define RGB_LED_G_PIN 40
+ #define RGB_LED_B_PIN 12
#define RGB_LED_W_PIN -1
#endif
diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
index 49adb6a0ef32..0d189a84dbfc 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 5 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 600 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 100 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 5 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 600 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 100 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=18
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
index 03f4831fb065..d5dcea666e17 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 5
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -548,6 +555,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +640,14 @@
#define DEFAULT_EJERK 20.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +729,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +775,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +802,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +841,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -844,11 +869,11 @@
// The size of the print bed
#define X_BED_SIZE 200
-#define Y_BED_SIZE 200
+#define Y_BED_SIZE 180
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
-#define Y_MIN_POS 20
+#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
@@ -879,6 +904,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1086,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1099,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1377,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1408,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1434,15 @@
*/
//#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
//
@@ -1478,12 +1507,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1507,40 +1542,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1550,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1557,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1625,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1722,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1742,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1770,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1857,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
@@ -1801,13 +1867,14 @@
* LED Type. Enable only one of the following two options.
*
*/
-//#define RGB_LED
+//#define RGB_LED // Enable for the Velleman RGB LED Add-on. https://www.velleman.eu/products/view/?id=430100
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
- #define RGB_LED_R_PIN 34
- #define RGB_LED_G_PIN 43
- #define RGB_LED_B_PIN 35
+ // Pin defines for the RGB LED Add-on.
+ #define RGB_LED_R_PIN 41
+ #define RGB_LED_G_PIN 40
+ #define RGB_LED_B_PIN 12
#define RGB_LED_W_PIN -1
#endif
diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
index 23ced8f3058b..e1fb3214d347 100644
--- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
+++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 20
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -546,18 +553,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -626,15 +673,14 @@
#define DEFAULT_EJERK 1.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -686,6 +732,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -715,6 +762,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -758,10 +808,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -785,6 +835,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -823,9 +874,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -889,6 +937,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -909,7 +961,7 @@
//===========================================================================
//=============================== Bed Leveling ==============================
//===========================================================================
-// @section bedlevel
+// @section calibrate
/**
* Choose one of the options below to enable G29 Bed Leveling. The parameters
@@ -1036,6 +1088,9 @@
#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)
//===========================================================================
@@ -1064,8 +1119,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1077,6 +1132,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1350,11 +1410,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1382,19 +1441,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1421,6 +1467,15 @@
*/
//#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
//
@@ -1485,12 +1540,18 @@
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 5
#define LCD_FEEDBACK_FREQUENCY_HZ 1000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1514,40 +1575,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1556,28 +1583,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1585,39 +1590,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1664,6 +1658,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1687,25 +1758,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1721,6 +1778,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1742,6 +1806,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1801,7 +1893,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
index 48bc8b9f1817..6414c4fc96fb 100644
--- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
+++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,28 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
index 02af2438bce2..a5b8763b118b 100644
--- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
+++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -544,10 +551,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -616,15 +663,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -676,6 +722,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -705,6 +752,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -748,10 +798,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -775,6 +825,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -813,9 +864,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -879,6 +927,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1057,8 +1109,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1070,6 +1122,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1343,11 +1400,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1375,19 +1431,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1414,6 +1457,15 @@
*/
//#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
//
@@ -1478,12 +1530,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1513,34 +1571,6 @@
//
//#define MAKRPANEL
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1549,28 +1579,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1578,39 +1586,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1657,6 +1654,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1677,25 +1751,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1711,6 +1771,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1732,6 +1799,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1791,7 +1886,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
index 17e6d888f361..5b7a29d28e9e 100644
--- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 300
@@ -516,6 +523,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 160
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -532,19 +542,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 73.5 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -621,12 +625,29 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -653,7 +674,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 100 } // default steps per unit for Kossel (GT2, 20 tooth)
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 16
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 100 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -696,15 +725,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -756,6 +784,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -785,6 +814,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -828,10 +860,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 5000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST) / 6
// The number of probes to perform at each point.
@@ -905,6 +937,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 2 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -943,9 +976,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -1009,6 +1039,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1142,17 +1176,6 @@
#endif
-#elif ENABLED(AUTO_BED_LEVELING_3POINT)
-
- // 3 arbitrary points to probe.
- // A simple cross-product is used to estimate the plane of the bed.
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1165,13 +1188,6 @@
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
-
#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
@@ -1206,8 +1222,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1219,6 +1235,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1382,7 +1403,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1491,11 +1512,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1523,19 +1543,6 @@
*/
#define DISPLAY_CHARSET_HD44780 WESTERN
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1562,6 +1569,15 @@
*/
#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
//
@@ -1627,12 +1643,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1656,40 +1678,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1698,28 +1686,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1727,39 +1693,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1806,6 +1761,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1826,25 +1858,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1860,6 +1878,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1881,6 +1906,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1940,7 +1993,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
index aa9f18e734fa..c33fe28ef127 100644
--- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -431,8 +443,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1670,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
index b63d1c595e29..f9cc2063f101 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 300
@@ -516,6 +523,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 160
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -532,19 +542,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 7
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 63 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -621,12 +625,29 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -653,7 +674,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 100 } // default steps per unit for Kossel (GT2, 20 tooth)
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 16
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 100 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -696,15 +725,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -756,6 +784,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -785,6 +814,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -828,10 +860,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 5000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST) / 6
// The number of probes to perform at each point.
@@ -866,8 +898,7 @@
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
#define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
- // Move the probe into position
- #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0
+ #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
#define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
#define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
@@ -905,6 +936,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 2 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -943,9 +975,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -1009,6 +1038,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1188,8 +1221,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1201,6 +1234,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1364,7 +1402,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1473,11 +1511,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1505,19 +1542,6 @@
*/
#define DISPLAY_CHARSET_HD44780 WESTERN
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1544,6 +1568,15 @@
*/
#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
//
@@ -1609,12 +1642,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1638,40 +1677,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1680,28 +1685,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1709,39 +1692,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1788,6 +1760,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1808,25 +1857,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1842,6 +1877,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1863,6 +1905,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1922,7 +1992,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
index 76a91d0ddaa2..83ff604e7505 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -431,8 +443,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1670,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
index f48ca4cfea31..369dd65ff8fc 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -456,15 +458,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 175
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 300
@@ -516,6 +523,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 160
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -532,19 +542,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 73.5 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -623,10 +627,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -653,7 +697,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 90 } // default steps per unit for Kossel (GT2, 20 tooth)
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 16
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 90 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -696,15 +748,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -756,6 +807,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -785,6 +837,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -828,10 +883,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 2000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -866,8 +921,7 @@
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
#define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
- // Move the probe into position
- #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0
+ #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
#define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
#define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
@@ -905,6 +959,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 50 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -943,9 +998,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -1009,6 +1061,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1111,6 +1167,7 @@
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
+ // Works best with 5 or more points in each dimension.
#define GRID_MAX_POINTS_X 9
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1187,8 +1244,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1200,6 +1257,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1363,7 +1425,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1472,11 +1534,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1504,19 +1565,6 @@
*/
#define DISPLAY_CHARSET_HD44780 WESTERN
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1543,6 +1591,15 @@
*/
//#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
//
@@ -1607,12 +1664,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1636,40 +1699,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1678,28 +1707,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1707,39 +1714,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1786,6 +1782,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1806,25 +1879,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1840,6 +1899,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1861,6 +1927,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1920,7 +2014,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
index d85257726455..fe3b08ba6b5a 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -431,8 +443,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1670,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
index 37d5c4236f5d..f9bb2a615f00 100644
--- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
+++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
@@ -92,7 +92,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -119,7 +119,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -138,7 +138,7 @@
// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
- #define MOTHERBOARD BOARD_MKS_13
+ #define MOTHERBOARD BOARD_MKS_GEN_13
#endif
// Optional custom name for your RepStrap or other custom machine
@@ -273,6 +273,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -282,6 +283,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -313,7 +315,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -461,15 +463,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -521,6 +528,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 200
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -537,19 +547,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 121.5 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -632,6 +636,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -658,7 +679,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 95 } // default steps per unit for Kossel (GT2, 20 tooth)
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 16
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 95 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -701,15 +730,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -761,6 +789,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -790,6 +819,9 @@
* readings with inductive probes and piezo sensors.
*/
#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -833,10 +865,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 4000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST (HOMING_FEEDRATE_Z / 4)
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 4)
// The number of probes to perform at each point.
@@ -907,6 +939,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -945,9 +978,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -1011,6 +1041,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1144,17 +1178,6 @@
#endif
-#elif ENABLED(AUTO_BED_LEVELING_3POINT)
-
- // 3 arbitrary points to probe.
- // A simple cross-product is used to estimate the plane of the bed.
- #define PROBE_PT_1_X -116
- #define PROBE_PT_1_Y -67.5
- #define PROBE_PT_2_X 116
- #define PROBE_PT_2_Y -67.5
- #define PROBE_PT_3_X 0
- #define PROBE_PT_3_Y 135
-
#elif ENABLED(AUTO_BED_LEVELING_UBL)
//===========================================================================
@@ -1192,17 +1215,17 @@
* Override if the automatically selected points are inadequate.
*/
#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
+ #define PROBE_PT_1_X -116
+ #define PROBE_PT_1_Y -67.5
+ #define PROBE_PT_2_X 116
+ #define PROBE_PT_2_Y -67.5
+ #define PROBE_PT_3_X 0
+ #define PROBE_PT_3_Y 135
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1214,6 +1237,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1377,7 +1405,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1486,11 +1514,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1518,19 +1545,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1557,6 +1571,15 @@
*/
#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
//
@@ -1621,12 +1644,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1650,40 +1679,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1692,28 +1687,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1721,39 +1694,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1800,6 +1762,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1820,25 +1859,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1854,6 +1879,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1875,6 +1907,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1934,7 +1994,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h
index e76648db323d..e6360aa25003 100644
--- a/Marlin/src/config/examples/delta/generic/Configuration.h
+++ b/Marlin/src/config/examples/delta/generic/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 -1
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -506,6 +513,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 200
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -522,19 +532,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 121.5 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -617,6 +621,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -643,7 +664,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth)
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 20
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -686,15 +715,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -746,6 +774,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -775,6 +804,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -818,10 +850,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 4000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -892,6 +924,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -930,9 +963,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -996,6 +1026,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1175,8 +1209,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1188,6 +1222,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1351,7 +1390,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1460,11 +1499,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1492,19 +1530,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1531,6 +1556,15 @@
*/
//#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
//
@@ -1595,12 +1629,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1624,40 +1664,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1666,28 +1672,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1695,39 +1679,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1774,6 +1747,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1794,25 +1844,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1828,6 +1864,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1849,6 +1892,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1908,7 +1979,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h
index d85257726455..fe3b08ba6b5a 100644
--- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -431,8 +443,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1670,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
index 93cf1a8c58bb..eed168e1846f 100644
--- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 7
#define TEMP_SENSOR_1 0
@@ -446,15 +448,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -506,6 +513,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 200
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -522,19 +532,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 78.0 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -613,10 +617,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -643,7 +687,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth)
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 20
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -686,15 +738,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -746,6 +797,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -775,6 +827,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -818,10 +873,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 4000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -856,8 +911,7 @@
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED
#define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
- // Move the probe into position
- #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0
+ #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position
#define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
#define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED
@@ -895,6 +949,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 50 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -933,9 +988,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -999,6 +1051,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1178,8 +1234,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1191,6 +1247,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1354,7 +1415,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1463,11 +1524,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1495,19 +1555,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1534,6 +1581,15 @@
*/
//#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
//
@@ -1598,12 +1654,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1627,40 +1689,6 @@
//
#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1669,28 +1697,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1698,39 +1704,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1777,6 +1772,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1797,25 +1869,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1831,6 +1889,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1852,6 +1917,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1911,7 +2004,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
index d85257726455..fe3b08ba6b5a 100644
--- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -431,8 +443,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1670,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
index f6ffad1c56ff..aad17a7c86c2 100644
--- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
@@ -91,7 +91,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -118,7 +118,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -272,6 +272,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -281,6 +282,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -312,7 +314,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -432,15 +434,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -492,6 +499,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 160
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -508,19 +518,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 110.0 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -599,10 +603,50 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -636,7 +680,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8 }
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 32
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 20
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 184.8 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
* Default Max Feed Rate (mm/s)
@@ -679,15 +731,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -739,6 +790,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -768,6 +820,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -814,10 +869,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -894,6 +949,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 100 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -933,9 +989,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -999,6 +1052,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1178,8 +1235,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1191,6 +1248,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1354,7 +1416,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1463,11 +1525,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1495,19 +1556,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1534,6 +1582,15 @@
*/
//#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
//
@@ -1598,12 +1655,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1627,40 +1690,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1669,28 +1698,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1698,39 +1705,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1777,6 +1773,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1797,25 +1870,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1831,6 +1890,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1852,6 +1918,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1911,7 +2005,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
index 8679bb32aa0c..8d771fe40c42 100644
--- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
@@ -187,10 +187,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -211,10 +213,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -436,8 +448,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -479,7 +507,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -500,9 +528,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -562,6 +587,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -753,6 +792,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -779,10 +842,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -907,61 +1006,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1007,62 +1100,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1210,32 +1270,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1281,7 +1328,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1587,27 +1634,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1625,4 +1675,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
index 4997a8aa14de..f68396106ca7 100644
--- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -450,15 +452,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -510,6 +517,9 @@
// and processor overload (too many expensive sqrt calls).
#define DELTA_SEGMENTS_PER_SECOND 160
+ // Convert feedrates to apply to the Effector instead of the Carriages
+ #define DELTA_FEEDRATE_SCALING
+
// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE
@@ -526,19 +536,13 @@
#if ENABLED(DELTA_AUTO_CALIBRATION)
// set the default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
-
- // Enable and set these values based on results of 'G33 A'
- //#define H_FACTOR 1.01
- //#define R_FACTOR 2.61
- //#define A_FACTOR 0.87
-
#endif
#if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU)
- // Set the radius for the calibration probe points - max 0.9 * DELTA_PRINTABLE_RADIUS for non-eccentric probes
+ // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes
#define DELTA_CALIBRATION_RADIUS 121.5 // mm
// Set the steprate for papertest probing
- #define PROBE_MANUALLY_STEP 0.025
+ #define PROBE_MANUALLY_STEP 0.05 // mm
#endif
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
@@ -617,24 +621,55 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
// @section motion
-// variables to calculate steps
-#define XYZ_FULL_STEPS_PER_ROTATION 200
-#define XYZ_MICROSTEPS 16
-#define XYZ_BELT_PITCH 2
-#define XYZ_PULLEY_TEETH 16
-
-// delta speeds must be the same on xyz
-#define XYZ_STEPS (XYZ_FULL_STEPS_PER_ROTATION * XYZ_MICROSTEPS / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
-
/**
* Default Settings
*
@@ -655,7 +690,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 158 } // default steps per unit for PowerWasp
+// variables to calculate steps
+#define XYZ_FULL_STEPS_PER_ROTATION 200
+#define XYZ_MICROSTEPS 16
+#define XYZ_BELT_PITCH 2
+#define XYZ_PULLEY_TEETH 16
+
+// delta speeds must be the same on xyz
+#define DEFAULT_XYZ_STEPS_PER_UNIT ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
+#define DEFAULT_AXIS_STEPS_PER_UNIT { DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, DEFAULT_XYZ_STEPS_PER_UNIT, 158 } // default steps per unit for PowerWasp
/**
* Default Max Feed Rate (mm/s)
@@ -698,15 +741,14 @@
#define DEFAULT_EJERK 20.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -758,6 +800,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -787,6 +830,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -830,10 +876,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -904,6 +950,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 20 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 10 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -942,9 +989,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -1008,6 +1052,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1187,8 +1235,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1200,6 +1248,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1363,7 +1416,7 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z }
- #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
@@ -1472,11 +1525,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1504,19 +1556,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1543,6 +1582,15 @@
*/
//#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
//
@@ -1607,12 +1655,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1636,40 +1690,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1678,28 +1698,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1707,39 +1705,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1786,6 +1773,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1806,25 +1870,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1840,6 +1890,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1861,6 +1918,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1920,7 +2005,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
index 90e6b273fdc0..78987d2a6b75 100644
--- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -431,8 +443,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -474,7 +502,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -495,9 +523,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -557,6 +582,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -748,6 +787,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -774,10 +837,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -902,61 +1001,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1002,62 +1095,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1205,32 +1265,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1276,7 +1323,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1582,27 +1629,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1620,4 +1670,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
index 2391a686e6a2..d8a755e0113b 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -273,6 +273,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -282,6 +283,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -313,7 +315,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -459,15 +461,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -557,9 +564,49 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
//=============================================================================
//============================== Movement Settings ============================
@@ -629,15 +676,14 @@
#define DEFAULT_EJERK 4.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -689,6 +735,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -718,6 +765,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -761,10 +811,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 7500
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -788,6 +838,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 6 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 6 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -826,9 +877,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -893,6 +941,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1037,13 +1089,6 @@
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
- #define PROBE_PT_1_X 53 // Probing points for 3-Point leveling of the mesh
- #define PROBE_PT_1_Y 323
- #define PROBE_PT_2_X 53
- #define PROBE_PT_2_Y 63
- #define PROBE_PT_3_X 348
- #define PROBE_PT_3_Y 211
-
#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
@@ -1069,17 +1114,17 @@
* Override if the automatically selected points are inadequate.
*/
#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
- //#define PROBE_PT_1_X 15
- //#define PROBE_PT_1_Y 180
- //#define PROBE_PT_2_X 15
- //#define PROBE_PT_2_Y 20
- //#define PROBE_PT_3_X 170
- //#define PROBE_PT_3_Y 20
+ #define PROBE_PT_1_X 53
+ #define PROBE_PT_1_Y 323
+ #define PROBE_PT_2_X 53
+ #define PROBE_PT_2_Y 63
+ #define PROBE_PT_3_X 348
+ #define PROBE_PT_3_Y 211
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1091,6 +1136,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1364,11 +1414,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1396,19 +1445,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1435,6 +1471,15 @@
*/
#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
//
@@ -1499,12 +1544,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1528,40 +1579,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1570,28 +1587,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1599,39 +1594,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1678,6 +1662,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1698,25 +1759,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1732,6 +1779,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1753,6 +1807,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1812,7 +1894,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
index d67bad7d7876..7f68f960ceeb 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ #define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 2 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 180 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h
index 0ec0b635c149..57ec8ee58808 100644
--- a/Marlin/src/config/examples/makibox/Configuration.h
+++ b/Marlin/src/config/examples/makibox/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -449,15 +451,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -547,10 +554,50 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -619,15 +666,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -679,6 +725,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -708,6 +755,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -751,10 +801,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -778,6 +828,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -816,9 +867,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -882,6 +930,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1060,8 +1112,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1073,6 +1125,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1346,11 +1403,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1378,19 +1434,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1417,6 +1460,15 @@
*/
//#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
//
@@ -1481,12 +1533,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1510,40 +1568,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1552,28 +1576,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1581,39 +1583,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1660,6 +1651,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1680,25 +1748,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1714,6 +1768,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1735,6 +1796,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1794,7 +1883,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h
index 336ac91352f5..2c2fb3dab0e9 100644
--- a/Marlin/src/config/examples/makibox/Configuration_adv.h
+++ b/Marlin/src/config/examples/makibox/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 4 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 4 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.7, 1.7, 1.7, 1.7 } // 5DPRINT
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h
index d8dec87f8161..fb18c0721f18 100644
--- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h
+++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#warning temp_sensor set to 998/999 (fake)
#define TEMP_SENSOR_0 999
@@ -447,15 +449,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -541,15 +548,55 @@
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define X_MAX_ENDSTOP_INVERTING 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 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 false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -606,7 +653,7 @@
/**
* Default Jerk (mm/s)
- * Override with M205 X Y Z EM
+ * 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
@@ -618,15 +665,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -678,6 +724,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -707,7 +754,11 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE
@@ -749,10 +800,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -776,6 +827,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -814,9 +866,6 @@
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -880,6 +929,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1058,8 +1111,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1071,6 +1124,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1197,7 +1255,7 @@
//
// M100 Free Memory Watcher
//
-//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
//
// G20/G21 Inch mode support
@@ -1344,11 +1402,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1376,19 +1433,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1415,6 +1459,15 @@
*/
//#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
//
@@ -1479,12 +1532,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1508,40 +1567,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1550,28 +1575,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1579,39 +1582,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1658,6 +1650,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1678,25 +1747,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1712,6 +1767,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1733,6 +1795,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1792,7 +1882,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
index f088255f4cab..dd59302c2ba3 100644
--- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
+++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
@@ -435,15 +437,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -537,6 +544,23 @@
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
+/**
+ * Endstop Noise Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -611,15 +635,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -671,6 +694,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -700,6 +724,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -743,10 +770,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -770,6 +797,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -808,9 +836,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
-// Enable this option for Toshiba stepper drivers
-#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -874,6 +899,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1052,8 +1081,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1065,6 +1094,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1338,11 +1372,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1370,19 +1403,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1409,6 +1429,15 @@
*/
//#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
//
@@ -1473,12 +1502,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1502,40 +1537,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1544,28 +1545,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1573,39 +1552,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1652,6 +1620,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1672,25 +1717,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1706,6 +1737,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1727,6 +1765,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1786,7 +1852,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
index 0703b8420af8..997bf647f51a 100644
--- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
+++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -472,7 +500,7 @@
#endif
//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
@@ -493,9 +521,6 @@
// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -555,6 +580,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -746,6 +785,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -772,10 +835,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -900,61 +999,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1000,62 +1093,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1203,32 +1263,19 @@
* stepperY.interpolate(0); \
* }
*/
- #define TMC_ADV() { }
+ #define TMC_ADV() { }
#endif // TMC2130 || TMC2208
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1274,7 +1321,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1580,27 +1627,30 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1618,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h
index 40efe5912df3..57b090552537 100644
--- a/Marlin/src/config/examples/wt150/Configuration.h
+++ b/Marlin/src/config/examples/wt150/Configuration.h
@@ -87,7 +87,7 @@
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
- * respecfully request that you retain the unmodified Marlin boot screen.
+ * respectfully request that you retain the unmodified Marlin boot screen.
*/
// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
@@ -114,7 +114,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT_2 -1
+//#define SERIAL_PORT_2 -1
/**
* This setting determines the communication speed of the printer.
@@ -268,6 +268,7 @@
*
* Temperature sensors available:
*
+ * -4 : thermocouple with AD8495
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
@@ -277,6 +278,7 @@
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
* 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)
@@ -308,7 +310,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 -2
#define TEMP_SENSOR_1 0
@@ -451,15 +453,20 @@
// @section extruder
-// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP.
-// It also enables the M302 command to set the minimum extrusion temperature
-// or to allow moving the extruder regardless of the hotend temperature.
-// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+/**
+ * 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! ***
+ */
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170
-// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH.
-// Note that for Bowden Extruders a too-small value here may prevent loading.
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
#define PREVENT_LENGTHY_EXTRUDE
#define EXTRUDE_MAXLENGTH 200
@@ -541,18 +548,58 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
-#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
-#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
-#define Z_MAX_ENDSTOP_INVERTING 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 false // set to true to invert the logic of the probe.
+/**
+ * Specify Stepper Driver types
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
+ * Stepper timing options can be overridden in Configuration_adv.h
+ *
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
+ * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
+ * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
+ * TMC5130, TMC5130_STANDALONE
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 E0_DRIVER_TYPE A4988
+#define E1_DRIVER_TYPE A4988
+#define E2_DRIVER_TYPE A4988
+#define E3_DRIVER_TYPE A4988
+#define E4_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 Filter
+ *
+ * Enable this option if endstops falsely trigger due to noise.
+ * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
+ * will end up at a slightly different position on each G28. This will also
+ * reduce accuracy of some bed probes.
+ * For mechanical switches, the better approach to reduce noise is to install
+ * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
+ * essentially noise-proof without sacrificing accuracy.
+ * This option also increases MCU load when endstops or the probe are enabled.
+ * So this is not recommended. USE AT YOUR OWN RISK.
+ * (This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, since they already include the 100nF capacitor.)
+ */
+//#define ENDSTOP_NOISE_FILTER
+
//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
@@ -621,15 +668,14 @@
#define DEFAULT_EJERK 5.0
/**
- * Realtime Jerk Control
+ * S-Curve Acceleration
*
* This option eliminates vibration during printing by fitting a Bézier
* curve to move acceleration, producing much smoother direction changes.
- * Because this is computationally-intensive, a 32-bit MCU is required.
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define BEZIER_JERK_CONTROL
+//#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -681,6 +727,7 @@
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
/**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
@@ -710,6 +757,9 @@
* readings with inductive probes and piezo sensors.
*/
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
//#define PROBING_FANS_OFF // Turn fans off when probing
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
@@ -753,10 +803,10 @@
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
-// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
-// Speed for the "accurate" probe of each point
+// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
// The number of probes to perform at each point.
@@ -780,6 +830,7 @@
*/
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
@@ -818,9 +869,6 @@
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
-// Enable this option for Toshiba stepper drivers
-//#define CONFIG_STEPPERS_TOSHIBA
-
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
@@ -884,6 +932,10 @@
#define MAX_SOFTWARE_ENDSTOP_Z
#endif
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
/**
* Filament Runout Sensors
* Mechanical or opto endstops are used to check for the presence of filament.
@@ -1062,8 +1114,8 @@
#endif
/**
- * Use the LCD controller for bed leveling
- * Requires MESH_BED_LEVELING or PROBE_MANUALLY
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
*/
//#define LCD_BED_LEVELING
@@ -1075,6 +1127,11 @@
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
/**
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
@@ -1348,11 +1405,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu, fi, fr, fr_utf8,
- * gl, hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
- * tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1380,19 +1436,6 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
-/**
- * LCD TYPE
- *
- * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
- * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
- * (These options will be enabled automatically for most displays.)
- *
- * IMPORTANT: The U8glib library is required for Full Graphic Display!
- * https://github.com/olikraus/U8glib_Arduino
- */
-//#define ULTRA_LCD // Character based
-//#define DOGLCD // Full graphics display
-
/**
* SD CARD
*
@@ -1419,6 +1462,15 @@
*/
//#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
//
@@ -1483,12 +1535,18 @@
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
//
-// CONTROLLER TYPE: Standard
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
-// Marlin supports a wide variety of controllers.
-// Enable one of the following options to specify your controller.
+// Note: Usually sold with a white PCB.
//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
//
// Original RADDS LCD Display+Encoder+SDCardReader
@@ -1512,40 +1570,6 @@
//
//#define PANEL_ONE
-//
-// MaKr3d Makr-Panel with graphic controller and SD support.
-// http://reprap.org/wiki/MaKr3d_MaKrPanel
-//
-//#define MAKRPANEL
-
-//
-// ReprapWorld Graphical LCD
-// https://reprapworld.com/?products_details&products_id/1218
-//
-//#define REPRAPWORLD_GRAPHICAL_LCD
-
-//
-// Activate one of these if you have a Panucatt Devices
-// Viki 2.0 or mini Viki with Graphic LCD
-// http://panucatt.com
-//
-//#define VIKI2
-//#define miniVIKI
-
-//
-// Adafruit ST7565 Full Graphic Controller.
-// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
-//
-//#define ELB_FULL_GRAPHIC_CONTROLLER
-
-//
-// RepRapDiscount Smart Controller.
-// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
-//
-// Note: Usually sold with a white PCB.
-//
-//#define REPRAP_DISCOUNT_SMART_CONTROLLER
-
//
// GADGETS3D G3D LCD/SD Controller
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
@@ -1554,28 +1578,6 @@
//
//#define G3D_PANEL
-//
-// RepRapDiscount FULL GRAPHIC Smart Controller
-// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
-//
-#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
-
-//
-// MakerLab Mini Panel with graphic
-// controller and SD support - http://reprap.org/wiki/Mini_panel
-//
-//#define MINIPANEL
-
-//
-// RepRapWorld REPRAPWORLD_KEYPAD v1.1
-// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
-//
-// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
-// is pressed, a value of 10.0 means 10mm per click.
-//
-//#define REPRAPWORLD_KEYPAD
-//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
-
//
// RigidBot Panel V1.0
// http://www.inventapart.com/
@@ -1583,39 +1585,28 @@
//#define RIGIDBOT_PANEL
//
-// BQ LCD Smart Controller shipped by
-// default with the BQ Hephestos 2 and Witbox 2.
-//
-//#define BQ_LCD_SMART_CONTROLLER
-
-//
-// Cartesio UI
-// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
//
-//#define CARTESIO_UI
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
//
-// ANET and Tronxy Controller supported displays.
+// 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.
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
-
//
-// LCD for Melzi Card with Graphical LCD
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
//
-//#define LCD_FOR_MELZI
+//#define ULTRA_LCD
-//
-// LCD for Malyan M200 printers.
-// This requires SDSUPPORT to be enabled
-//
-//#define MALYAN_LCD
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
//
// CONTROLLER TYPE: I2C
@@ -1662,6 +1653,83 @@
//
//#define LCD_I2C_VIKI
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//=============================================================================
+//======================= 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
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://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
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://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
+
//
// SSD1306 OLED full graphics generic display
//
@@ -1682,25 +1750,11 @@
//
//#define ULTI_CONTROLLER
-//
-// CONTROLLER TYPE: Shift register panels
-//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
-// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
-//
-//#define SAV_3DLCD
-
//
// TinyBoy2 128x64 OLED / Encoder Panel
//
//#define OLED_PANEL_TINYBOY2
-//
-// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
-// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
-//
-//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
-
//
// MKS MINI12864 with graphic controller and SD support
// http://reprap.org/wiki/MKS_MINI_12864
@@ -1716,6 +1770,13 @@
//
//#define CR10_STOCKDISPLAY
+//
+// ANET and Tronxy Graphical Controller
+//
+//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+ // A clone of the RepRapDiscount full graphics display but with
+ // different pins/wiring (see pins_ANET_10.h).
+
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
@@ -1737,6 +1798,34 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+// This requires SDSUPPORT to be enabled
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
//=============================================================================
//=============================== Extra Features ==============================
//=============================================================================
@@ -1796,7 +1885,7 @@
* For Neopixel LED an overall brightness parameter is also available.
*
* *** CAUTION ***
- * LED Strips require a MOFSET Chip between PWM lines and LEDs,
+ * 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
diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h
index c7150b848e1d..5b0ce763a3d8 100644
--- a/Marlin/src/config/examples/wt150/Configuration_adv.h
+++ b/Marlin/src/config/examples/wt150/Configuration_adv.h
@@ -182,10 +182,12 @@
// @section temperature
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
-#define TEMP_SENSOR_AD595_OFFSET 0.0
-#define TEMP_SENSOR_AD595_GAIN 1.0
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
/**
* Controller Fan
@@ -206,10 +208,20 @@
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
-// This defines the minimal speed for the main fan, run in PWM mode
-// to enable uncomment and set minimal PWM speed for reliable running (1-255)
-// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
// @section extruder
@@ -429,8 +441,24 @@
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -473,7 +501,7 @@
#endif
#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
-#define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8
+#define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 0.22, 0.22, 0.39, 0.42, 0.42 } // MIGHTYBOARD_REVE
@@ -494,9 +522,6 @@
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
-// Leave out seldom-used LCD menu items to recover some Program Memory
-//#define SLIM_LCD_MENUS
-
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
@@ -556,6 +581,20 @@
// Add an option in the menu to run all auto#.g files
//#define MENU_ADDAUTOSTART
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
/**
* Sort SD file listings in alphabetical order.
*
@@ -747,6 +786,30 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+ /**
+ * Specify an action command to send to the host on a recovery attempt or failure.
+ * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
+ * The host must be configured to handle the action command.
+ */
+ #define G29_ACTION_ON_RECOVER "probe_rewipe"
+ #define G29_ACTION_ON_FAILURE "probe_failed"
+#endif
+
// @section extras
//
@@ -773,10 +836,46 @@
// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6
-// The minimum pulse width (in µs) for stepping a stepper.
-// Set this if you find stepping unreliable, or if using a very fast CPU.
-// 0 is OK for AVR, 0 is OK for A4989 drivers, 2 is needed for DRV8825 drivers
-#define MINIMUM_STEPPER_PULSE 2 // (µs) DRV8825 on 32bit CPUs
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988 stepper drivers
+ * 1 : Minimum for LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -901,61 +1000,55 @@
*/
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
- #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
- // This short retract is done immediately, before parking the nozzle.
- #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- // Set to 0 for manual unloading.
- #define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
- #define FILAMENT_CHANGE_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
- // For Bowden, the full length of the tube and nozzle.
- // For direct drive, the full length of the nozzle.
- #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
- #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // (mm) Length to extrude after loading.
- // Set to 0 for manual extrusion.
- // Filament can be extruded repeatedly from the Filament Change menu
- // until extrusion is consistent, and to purge old filament.
-
- // Filament Unload does a Retract, Delay, and Purge first:
- #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
- #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
- #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
- //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
-
- #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
- #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
- #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
-
- //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
- //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
-
- //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
- //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+ #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
+ #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
+ #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
+
+ //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
+ //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
+
+ //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
+ //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
// @section tmc
/**
- * Enable this section if you have TMC26X motor drivers.
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
- * (https://github.com/trinamic/TMC26XStepper.git)
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1001,62 +1094,29 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * The TMC2130Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2130Stepper
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
*
- * You'll also need the TMC2208Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2208Stepper).
+ * The TMC2208Stepper library is required for this stepper driver.
+ * https://github.com/teemuatlut/TMC2208Stepper
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAS_TRINAMIC
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1211,25 +1271,12 @@
// @section L6470
/**
- * Enable this section if you have L6470 motor drivers.
- * You need to import the L6470 library into the Arduino IDE for this.
- * (https://github.com/ameyer/Arduino-L6470)
+ * L6470 Stepper Driver options
+ *
+ * The Arduino-L6470 library is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
*/
-
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAS_DRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1275,7 +1322,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
@@ -1581,27 +1628,29 @@
/**
* MAX7219 Debug Matrix
*
- * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip, which can be used as a status
- * display. Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
- *
- * Fully assembled MAX7219 boards can be found on the internet for under $2(US).
- * For example, see https://www.ebay.com/sch/i.html?_nkw=332349290049
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
*/
//#define MAX7219_DEBUG
#if ENABLED(MAX7219_DEBUG)
- #define MAX7219_CLK_PIN 64 // 77 on Re-ARM // Configuration of the 3 pins to control the display
- #define MAX7219_DIN_PIN 57 // 78 on Re-ARM
- #define MAX7219_LOAD_PIN 44 // 79 on Re-ARM
-
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=18
/**
* Sample debug features
* If you add more debug displays, be careful to avoid conflicts!
*/
#define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
- #define MAX7219_DEBUG_STEPPER_HEAD 3 // Show the stepper queue head position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_TAIL 5 // Show the stepper queue tail position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
- #define MAX7219_DEBUG_STEPPER_QUEUE 0 // Show the current stepper queue depth on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
// If you experience stuttering, reboots, etc. this option can reveal how
// tweaks made to the configuration are affecting the printer in real-time.
#endif
@@ -1619,4 +1668,16 @@
// Default behaviour is limited to Z axis only.
#endif
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
+
#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index 248f74cb6c42..0d15bb9cbc40 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -58,9 +58,10 @@
#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
-#define BOARD_MKS_BASE 40 // MKS BASE 1.0
+#define BOARD_MKS_BASE 40 // MKS BASE v1.0
+#define BOARD_MKS_BASE_15 405 // MKS v1.5 with Allegro A4982 stepper drivers
#define BOARD_MKS_BASE_HEROIC 41 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
-#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher)
+#define BOARD_MKS_GEN_13 47 // MKS GEN v1.3 or 1.4
#define BOARD_MKS_GEN_L 53 // MKS GEN L
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
@@ -75,7 +76,8 @@
#define BOARD_RUMBA 80 // Rumba
#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
#define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
-#define BOARD_TRIGORILLA 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB
+#define BOARD_TRIGORILLA_13 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB
+#define BOARD_TRIGORILLA_14 443 // TriGorilla Anycubic version 1.4 based on RAMPS EFB
#define BOARD_RAMPS_ENDER_4 243 // Creality: Ender-4, CR-8
//
@@ -102,6 +104,7 @@
#define BOARD_SCOOVO_X9H 321 // abee Scoovo X9H
#define BOARD_GT2560_REV_A 74 // Geeetech GT2560 Rev. A
#define BOARD_GT2560_REV_A_PLUS 75 // Geeetech GT2560 Rev. A+ (with auto level probe)
+#define BOARD_EINSTART_S 666 // Einstart retrofit
//
// ATmega1281, ATmega2561
@@ -123,6 +126,7 @@
#define BOARD_MELZI_TRONXY 505 // Tronxy X5S
#define BOARD_STB_11 64 // STB V1.1
#define BOARD_AZTEEG_X1 65 // Azteeg X1
+#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)
//
// Other ATmega644P, ATmega644, ATmega1284P
@@ -139,7 +143,6 @@
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_SETHI 20 // Sethi 3D_1
-#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)
//
// Teensyduino - AT90USB1286, AT90USB1286P
@@ -151,7 +154,7 @@
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
-#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
+#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286)
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
//
@@ -174,6 +177,7 @@
//
// SAM3X8E ARM Cortex M3
//
+
#define BOARD_DUE3DOM 1411 // DUE3DOM for Arduino DUE
#define BOARD_DUE3DOM_MINI 1412 // DUE3DOM MINI for Arduino DUE
#define BOARD_RADDS 1502 // RADDS
@@ -194,26 +198,40 @@
#define BOARD_RAMPS4DUE_EFF 1545 // RAMPS4DUE (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS4DUE_EEF 1546 // RAMPS4DUE (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS4DUE_SF 1548 // RAMPS4DUE (Power outputs: Spindle, Controller Fan)
-#define BOARD_RURAMPS4D 1550 // RuRAMPS4Duo v1 (Power outputs: Hotend0, Hotend2, Hotend2, Fan0, Fan1, Bed)
+#define BOARD_RURAMPS4D_11 1550 // RuRAMPS4Duo v1.1 (Power outputs: Hotend0, Hotend1, Hotend2, Fan0, Fan1, Bed)
+#define BOARD_RURAMPS4D_13 1551 // RuRAMPS4Duo v1.3 (Power outputs: Hotend0, Hotend1, Hotend2, Fan0, Fan1, Bed)
#define BOARD_ULTRATRONICS_PRO 1560 // ReprapWorld Ultratronics Pro V1.0
#define BOARD_ARCHIM2 1590 // UltiMachine Archim2 (with TMC2130 drivers)
#define BOARD_ALLIGATOR 1602 // Alligator Board R2
//
-// ARM Cortex M4
+// STM32 ARM Cortex-M3
//
-#define BOARD_TEENSY35_36 841 // Teensy3.5 and Teensy3.6
-#define BOARD_STM32F1R 1800 // STM3R Libmaple based STM32F1 controller
+
+#define BOARD_STM32F1R 1800 // STM32R Libmaple based STM32F1 controller
#define BOARD_MALYAN_M200 1801 // STM32C8T6 Libmaple based stm32f1 controller
-#define BOARD_BEAST 1802 // STM32FxxxVxT6 Libmaple based stm32f4 controller
#define BOARD_STM3R_MINI 1803 // STM32 Libmaple based stm32f1 controller
+#define BOARD_GTM32_PRO_VB 1805 // STM32f103VET6 controller
+
+//
+// STM32 ARM Cortex-M4F
+//
+
+#define BOARD_TEENSY35_36 841 // Teensy3.5 and Teensy3.6
+#define BOARD_BEAST 1802 // STM32FxxxVxT6 Libmaple based stm32f4 controller
+#define BOARD_STM32F4 1804 // STM32 STM32GENERIC based STM32F4 controller
//
// ARM Cortex M7
//
+
#define BOARD_THE_BORG 1860 // THE-BORG (Power outputs: Hotend0, Hotend1, Bed, Fan)
+//
+// Espressif ESP32 WiFi
+//
+#define BOARD_ESP32 1900
-#define MB(board) (MOTHERBOARD==BOARD_##board)
+#define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
#endif // __BOARDS_H
diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h
new file mode 100644
index 000000000000..dbbeaeb428ee
--- /dev/null
+++ b/Marlin/src/core/drivers.h
@@ -0,0 +1,102 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "../inc/MarlinConfigPre.h"
+
+#define A4988 0x001
+#define DRV8825 0x002
+#define LV8729 0x003
+#define L6470 0x104
+#define TB6560 0x005
+#define TB6600 0x006
+#define TMC2100 0x007
+#define TMC2130 0x108
+#define TMC2130_STANDALONE 0x008
+#define TMC2208 0x109
+#define TMC2208_STANDALONE 0x009
+#define TMC26X 0x10A
+#define TMC26X_STANDALONE 0x00A
+#define TMC2660 0x10B
+#define TMC2660_STANDALONE 0x00B
+
+#define AXIS_DRIVER_TYPE(A,T) ( defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T) )
+
+#define AXIS_DRIVER_TYPE_X(T) AXIS_DRIVER_TYPE(X,T)
+#define AXIS_DRIVER_TYPE_Y(T) AXIS_DRIVER_TYPE(Y,T)
+#define AXIS_DRIVER_TYPE_Z(T) AXIS_DRIVER_TYPE(Z,T)
+
+#if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)
+ #define AXIS_DRIVER_TYPE_X2(T) AXIS_DRIVER_TYPE(X2,T)
+#else
+ #define AXIS_DRIVER_TYPE_X2(T) false
+#endif
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define AXIS_DRIVER_TYPE_Y2(T) AXIS_DRIVER_TYPE(Y2,T)
+#else
+ #define AXIS_DRIVER_TYPE_Y2(T) false
+#endif
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ #define AXIS_DRIVER_TYPE_Z2(T) AXIS_DRIVER_TYPE(Z2,T)
+#else
+ #define AXIS_DRIVER_TYPE_Z2(T) false
+#endif
+#if E_STEPPERS > 0
+ #define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE(E0,T)
+#else
+ #define AXIS_DRIVER_TYPE_E0(T) false
+#endif
+#if E_STEPPERS > 1
+ #define AXIS_DRIVER_TYPE_E1(T) AXIS_DRIVER_TYPE(E1,T)
+#else
+ #define AXIS_DRIVER_TYPE_E1(T) false
+#endif
+#if E_STEPPERS > 2
+ #define AXIS_DRIVER_TYPE_E2(T) AXIS_DRIVER_TYPE(E2,T)
+#else
+ #define AXIS_DRIVER_TYPE_E2(T) false
+#endif
+#if E_STEPPERS > 3
+ #define AXIS_DRIVER_TYPE_E3(T) AXIS_DRIVER_TYPE(E3,T)
+#else
+ #define AXIS_DRIVER_TYPE_E3(T) false
+#endif
+#if E_STEPPERS > 4
+ #define AXIS_DRIVER_TYPE_E4(T) AXIS_DRIVER_TYPE(E4,T)
+#else
+ #define AXIS_DRIVER_TYPE_E4(T) false
+#endif
+
+#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \
+ AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \
+ AXIS_DRIVER_TYPE_Z(T) || AXIS_DRIVER_TYPE_Z2(T) || \
+ AXIS_DRIVER_TYPE_E0(T) || AXIS_DRIVER_TYPE_E1(T) || \
+ AXIS_DRIVER_TYPE_E2(T) || AXIS_DRIVER_TYPE_E3(T) || \
+ AXIS_DRIVER_TYPE_E4(T) )
+
+// Test for supported TMC drivers that require advanced configuration
+// Does not match standalone configurations
+#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) )
+
+#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE_##A(TMC2130) || \
+ AXIS_DRIVER_TYPE_##A(TMC2208) || \
+ AXIS_DRIVER_TYPE_##A(TMC2660) )
diff --git a/Marlin/src/core/enum.h b/Marlin/src/core/enum.h
index 8101b9aeab5d..d9a3cd18c2e7 100644
--- a/Marlin/src/core/enum.h
+++ b/Marlin/src/core/enum.h
@@ -26,10 +26,9 @@
/**
* Axis indices as enumerated constants
*
- * Special axis:
- * - A_AXIS and B_AXIS are used by COREXY printers
- * - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
- * between X_AXIS and X Head movement, like CoreXY bots
+ * - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
+ * - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
+ * - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
*/
enum AxisEnum : unsigned char {
X_AXIS = 0,
@@ -46,8 +45,8 @@ enum AxisEnum : unsigned char {
NO_AXIS = 0xFF
};
-#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
-#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR0)-(a<0))
#define IS_POWER_OF_2(x) ((x) && !((x) & ((x) - 1)))
-// Macros to contrain values
-#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
-#define NOMORE(v,n) do{ if (v > n) v = n; }while(0)
-#define LIMIT(v,n1,n2) do{ if (v < n1) v = n1; else if (v > n2) v = n2; }while(0)
+// Macros to constrain values
+// Avoid double evaluation of arguments to NOMORE/NOLESS/LIMIT
+#undef NOMORE
+#undef NOLESS
+#undef LIMIT
+#ifdef __cplusplus
+
+ // C++11 solution that is standards compliant.
+ template static inline constexpr void NOLESS(V& v, const N n) {
+ if (v < n) v = n;
+ }
+ template static inline constexpr void NOMORE(V& v, const N n) {
+ if (v > n) v = n;
+ }
+ template static inline constexpr void LIMIT(V& v, const N1 n1, const N2 n2) {
+ if (v < n1) v = n1;
+ else if (v > n2) v = n2;
+ }
+
+#else
+
+ // Using GCC extensions, but Travis GCC version does not like it and gives
+ // "error: statement-expressions are not allowed outside functions nor in template-argument lists"
+ #define NOLESS(v, n) \
+ do { \
+ __typeof__(n) _n = (n); \
+ if (v < _n) v = _n; \
+ } while(0)
+
+ #define NOMORE(v, n) \
+ do { \
+ __typeof__(n) _n = (n); \
+ if (v > _n) v = _n; \
+ } while(0)
+
+ #define LIMIT(v, n1, n2) \
+ do { \
+ __typeof__(n1) _n1 = (n1); \
+ __typeof__(n2) _n2 = (n2); \
+ if (v < _n1) v = _n1; \
+ else if (v > _n2) v = _n2; \
+ } while(0)
+
+#endif
// Macros to support option testing
#define _CAT(a, ...) a ## __VA_ARGS__
@@ -134,9 +143,11 @@
#define SWITCH_ENABLED_true 1
#define SWITCH_ENABLED_0 0
#define SWITCH_ENABLED_1 1
+#define SWITCH_ENABLED_0x0 0
+#define SWITCH_ENABLED_0x1 1
#define SWITCH_ENABLED_ 1
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
-#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
+#define DISABLED(b) !ENABLED(b)
#define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
#define NUMERIC(a) WITHIN(a, '0', '9')
@@ -145,7 +156,7 @@
#define DECIMAL_SIGNED(a) (DECIMAL(a) || (a) == '-' || (a) == '+')
#define COUNT(a) (sizeof(a)/sizeof(*a))
#define ZERO(a) memset(a,0,sizeof(a))
-#define COPY(a,b) memcpy(a,b,min(sizeof(a),sizeof(b)))
+#define COPY(a,b) memcpy(a,b,MIN(sizeof(a),sizeof(b)))
// Macros for initializing arrays
#define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) { v1, v2, v3, v4, v5, v6 }
@@ -189,38 +200,74 @@
#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
-#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
-#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
+#define MMM_TO_MMS(MM_M) ((MM_M)/60.0f)
+#define MMS_TO_MMM(MM_S) ((MM_S)*60.0f)
#define NOOP do{} while(0)
#define CEILING(x,y) (((x) + (y) - 1) / (y))
-#define MIN3(a, b, c) min(min(a, b), c)
-#define MIN4(a, b, c, d) min(MIN3(a, b, c), d)
-#define MIN5(a, b, c, d, e) min(MIN4(a, b, c, d), e)
-#define MAX3(a, b, c) max(max(a, b), c)
-#define MAX4(a, b, c, d) max(MAX3(a, b, c), d)
-#define MAX5(a, b, c, d, e) max(MAX4(a, b, c, d), e)
+// Avoid double evaluation of arguments on MIN/MAX/ABS
+#undef MIN
+#undef MAX
+#undef ABS
+#ifdef __cplusplus
+
+ // C++11 solution that is standards compliant. Return type is deduced automatically
+ template static inline constexpr auto MIN(const L lhs, const R rhs) -> decltype(lhs + rhs) {
+ return lhs < rhs ? lhs : rhs;
+ }
+ template static inline constexpr auto MAX(const L lhs, const R rhs) -> decltype(lhs + rhs){
+ return lhs > rhs ? lhs : rhs;
+ }
+ template static inline constexpr const T ABS(const T v) {
+ return v >= 0 ? v : -v;
+ }
+#else
+
+ // Using GCC extensions, but Travis GCC version does not like it and gives
+ // "error: statement-expressions are not allowed outside functions nor in template-argument lists"
+ #define MIN(a, b) \
+ ({__typeof__(a) _a = (a); \
+ __typeof__(b) _b = (b); \
+ _a < _b ? _a : _b;})
+
+ #define MAX(a, b) \
+ ({__typeof__(a) _a = (a); \
+ __typeof__(b) _b = (b); \
+ _a > _b ? _a : _b;})
+
+ #define ABS(a) \
+ ({__typeof__(a) _a = (a); \
+ _a >= 0 ? _a : -_a;})
+
+#endif
+
+#define MIN3(a, b, c) MIN(MIN(a, b), c)
+#define MIN4(a, b, c, d) MIN(MIN3(a, b, c), d)
+#define MIN5(a, b, c, d, e) MIN(MIN4(a, b, c, d), e)
+#define MAX3(a, b, c) MAX(MAX(a, b), c)
+#define MAX4(a, b, c, d) MAX(MAX3(a, b, c), d)
+#define MAX5(a, b, c, d, e) MAX(MAX4(a, b, c, d), e)
-#define UNEAR_ZERO(x) ((x) < 0.000001)
-#define NEAR_ZERO(x) WITHIN(x, -0.000001, 0.000001)
+#define UNEAR_ZERO(x) ((x) < 0.000001f)
+#define NEAR_ZERO(x) WITHIN(x, -0.000001f, 0.000001f)
#define NEAR(x,y) NEAR_ZERO((x)-(y))
-#define RECIPROCAL(x) (NEAR_ZERO(x) ? 0.0 : 1.0 / (x))
-#define FIXFLOAT(f) (f + 0.00001)
+#define RECIPROCAL(x) (NEAR_ZERO(x) ? 0 : (1 / float(x)))
+#define FIXFLOAT(f) (f + (f < 0 ? -0.00005f : 0.00005f))
//
// Maths macros that can be overridden by HAL
//
-#define ATAN2(y, x) atan2(y, x)
-#define FABS(x) fabs(x)
-#define POW(x, y) pow(x, y)
-#define SQRT(x) sqrt(x)
-#define CEIL(x) ceil(x)
-#define FLOOR(x) floor(x)
-#define LROUND(x) lround(x)
-#define FMOD(x, y) fmod(x, y)
+#define ATAN2(y, x) atan2f(y, x)
+#define POW(x, y) powf(x, y)
+#define SQRT(x) sqrtf(x)
+#define RSQRT(x) (1 / sqrtf(x))
+#define CEIL(x) ceilf(x)
+#define FLOOR(x) floorf(x)
+#define LROUND(x) lroundf(x)
+#define FMOD(x, y) fmodf(x, y)
#define HYPOT(x,y) SQRT(HYPOT2(x,y))
-#endif //__MACROS_H
+#endif // _CORE_MACROS_H_
diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp
index f7b9dbf61dd2..d53d730c6e8a 100644
--- a/Marlin/src/core/serial.cpp
+++ b/Marlin/src/core/serial.cpp
@@ -61,6 +61,8 @@ void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (c
#if ENABLED(DEBUG_LEVELING_FEATURE)
+ #include "enum.h"
+
void print_xyz(const char* prefix, const char* suffix, const float x, const float y, const float z) {
serialprintPGM(prefix);
SERIAL_CHAR('(');
@@ -75,10 +77,4 @@ void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (c
print_xyz(prefix, suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
}
- #if HAS_ABL
- void print_xyz(const char* prefix, const char* suffix, const vector_3 &xyz) {
- print_xyz(prefix, suffix, xyz.x, xyz.y, xyz.z);
- }
- #endif
-
#endif
diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h
index f25791324a1f..bbabdb70e368 100644
--- a/Marlin/src/core/serial.h
+++ b/Marlin/src/core/serial.h
@@ -23,11 +23,8 @@
#ifndef __SERIAL_H__
#define __SERIAL_H__
-#include "../inc/MarlinConfig.h"
-
-#if HAS_ABL && ENABLED(DEBUG_LEVELING_FEATURE)
- #include "../libs/vector_3.h"
-#endif
+#include "../inc/MarlinConfigPre.h"
+#include HAL_PATH(../HAL, HAL.h)
/**
* Define debug bit-masks
@@ -44,23 +41,6 @@ enum DebugFlags : unsigned char {
DEBUG_ALL = 0xFF
};
-#if ENABLED(EMERGENCY_PARSER)
- enum e_parser_state : char {
- state_RESET,
- state_N,
- state_M,
- state_M1,
- state_M10,
- state_M108,
- state_M11,
- state_M112,
- state_M4,
- state_M41,
- state_M410,
- state_IGNORE // to '\n'
- };
-#endif
-
extern uint8_t marlin_debug_flags;
#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
@@ -260,9 +240,6 @@ void serialprintPGM(const char* str);
#if ENABLED(DEBUG_LEVELING_FEATURE)
void print_xyz(const char* prefix, const char* suffix, const float x, const float y, const float z);
void print_xyz(const char* prefix, const char* suffix, const float xyz[]);
- #if HAS_ABL
- void print_xyz(const char* prefix, const char* suffix, const vector_3 &xyz);
- #endif
#define DEBUG_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
#endif
diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp
index d8873173efcc..7ec3fde5e8a7 100644
--- a/Marlin/src/core/utility.cpp
+++ b/Marlin/src/core/utility.cpp
@@ -41,14 +41,14 @@ void safe_delay(millis_t ms) {
uint8_t *ptr = (uint8_t *)data;
while (cnt--) {
*crc = (uint16_t)(*crc ^ (uint16_t)(((uint16_t)*ptr++) << 8));
- for (uint8_t x = 0; x < 8; x++)
+ for (uint8_t i = 0; i < 8; i++)
*crc = (uint16_t)((*crc & 0x8000) ? ((uint16_t)(*crc << 1) ^ 0x1021) : (*crc << 1));
}
}
#endif // EEPROM_SETTINGS
-#if ENABLED(ULTRA_LCD)
+#if ENABLED(ULTRA_LCD) || ENABLED(DEBUG_LEVELING_FEATURE)
char conv[8] = { 0 };
@@ -58,193 +58,190 @@ void safe_delay(millis_t ms) {
#define MINUSOR(n, alt) (n >= 0 ? (alt) : (n = -n, '-'))
// Convert unsigned int to string 123 format
- char* i8tostr3(const uint8_t xx) {
- conv[4] = RJDIGIT(xx, 100);
- conv[5] = RJDIGIT(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ char* i8tostr3(const uint8_t i) {
+ conv[4] = RJDIGIT(i, 100);
+ conv[5] = RJDIGIT(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return &conv[4];
}
// Convert signed int to rj string with 123 or -12 format
- char* itostr3(const int x) {
- int xx = x;
- conv[4] = MINUSOR(xx, RJDIGIT(xx, 100));
- conv[5] = RJDIGIT(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ char* itostr3(int i) {
+ conv[4] = MINUSOR(i, RJDIGIT(i, 100));
+ conv[5] = RJDIGIT(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return &conv[4];
}
// Convert unsigned int to lj string with 123 format
- char* itostr3left(const int xx) {
+ char* itostr3left(const int i) {
char *str = &conv[6];
- *str = DIGIMOD(xx, 1);
- if (xx >= 10) {
- *(--str) = DIGIMOD(xx, 10);
- if (xx >= 100)
- *(--str) = DIGIMOD(xx, 100);
+ *str = DIGIMOD(i, 1);
+ if (i >= 10) {
+ *(--str) = DIGIMOD(i, 10);
+ if (i >= 100)
+ *(--str) = DIGIMOD(i, 100);
}
return str;
}
// Convert signed int to rj string with 1234, _123, -123, _-12, or __-1 format
- char *itostr4sign(const int x) {
- const bool neg = x < 0;
- const int xx = neg ? -x : x;
- if (x >= 1000) {
- conv[3] = DIGIMOD(xx, 1000);
- conv[4] = DIGIMOD(xx, 100);
- conv[5] = DIGIMOD(xx, 10);
+ char* itostr4sign(const int i) {
+ const bool neg = i < 0;
+ const int ii = neg ? -i : i;
+ if (i >= 1000) {
+ conv[3] = DIGIMOD(ii, 1000);
+ conv[4] = DIGIMOD(ii, 100);
+ conv[5] = DIGIMOD(ii, 10);
+ }
+ else if (ii >= 100) {
+ conv[3] = neg ? '-' : ' ';
+ conv[4] = DIGIMOD(ii, 100);
+ conv[5] = DIGIMOD(ii, 10);
}
else {
- if (xx >= 100) {
- conv[3] = neg ? '-' : ' ';
- conv[4] = DIGIMOD(xx, 100);
- conv[5] = DIGIMOD(xx, 10);
+ conv[3] = ' ';
+ conv[4] = ' ';
+ if (ii >= 10) {
+ conv[4] = neg ? '-' : ' ';
+ conv[5] = DIGIMOD(ii, 10);
}
else {
- conv[3] = ' ';
- conv[4] = ' ';
- if (xx >= 10) {
- conv[4] = neg ? '-' : ' ';
- conv[5] = DIGIMOD(xx, 10);
- }
- else {
- conv[5] = neg ? '-' : ' ';
- }
+ conv[5] = neg ? '-' : ' ';
}
}
- conv[6] = DIGIMOD(xx, 1);
+ conv[6] = DIGIMOD(ii, 1);
return &conv[3];
}
// Convert unsigned float to string with 1.23 format
- char* ftostr12ns(const float &x) {
- const long xx = (x < 0 ? -x : x) * 100;
- conv[3] = DIGIMOD(xx, 100);
+ char* ftostr12ns(const float &f) {
+ const long i = ((f < 0 ? -f : f) * 1000 + 5) / 10;
+ conv[3] = DIGIMOD(i, 100);
conv[4] = '.';
- conv[5] = DIGIMOD(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ conv[5] = DIGIMOD(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return &conv[3];
}
// Convert signed float to fixed-length string with 023.45 / -23.45 format
- char *ftostr32(const float &x) {
- long xx = x * 100;
- conv[1] = MINUSOR(xx, DIGIMOD(xx, 10000));
- conv[2] = DIGIMOD(xx, 1000);
- conv[3] = DIGIMOD(xx, 100);
+ char* ftostr52(const float &f) {
+ long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
+ conv[1] = MINUSOR(i, DIGIMOD(i, 10000));
+ conv[2] = DIGIMOD(i, 1000);
+ conv[3] = DIGIMOD(i, 100);
conv[4] = '.';
- conv[5] = DIGIMOD(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ conv[5] = DIGIMOD(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return &conv[1];
}
#if ENABLED(LCD_DECIMAL_SMALL_XY)
// Convert float to rj string with 1234, _123, -123, _-12, 12.3, _1.2, or -1.2 format
- char *ftostr4sign(const float &fx) {
- const int x = fx * 10;
- if (!WITHIN(x, -99, 999)) return itostr4sign((int)fx);
- const bool neg = x < 0;
- const int xx = neg ? -x : x;
- conv[3] = neg ? '-' : (xx >= 100 ? DIGIMOD(xx, 100) : ' ');
- conv[4] = DIGIMOD(xx, 10);
+ char* ftostr4sign(const float &f) {
+ const int i = (f * 100 + (f < 0 ? -5: 5)) / 10;
+ if (!WITHIN(i, -99, 999)) return itostr4sign((int)f);
+ const bool neg = i < 0;
+ const int ii = neg ? -i : i;
+ conv[3] = neg ? '-' : (ii >= 100 ? DIGIMOD(ii, 100) : ' ');
+ conv[4] = DIGIMOD(ii, 10);
conv[5] = '.';
- conv[6] = DIGIMOD(xx, 1);
+ conv[6] = DIGIMOD(ii, 1);
return &conv[3];
}
#endif // LCD_DECIMAL_SMALL_XY
// Convert float to fixed-length string with +123.4 / -123.4 format
- char* ftostr41sign(const float &x) {
- int xx = x * 10;
- conv[1] = MINUSOR(xx, '+');
- conv[2] = DIGIMOD(xx, 1000);
- conv[3] = DIGIMOD(xx, 100);
- conv[4] = DIGIMOD(xx, 10);
+ char* ftostr41sign(const float &f) {
+ int i = (f * 100 + (f < 0 ? -5: 5)) / 10;
+ conv[1] = MINUSOR(i, '+');
+ conv[2] = DIGIMOD(i, 1000);
+ conv[3] = DIGIMOD(i, 100);
+ conv[4] = DIGIMOD(i, 10);
conv[5] = '.';
- conv[6] = DIGIMOD(xx, 1);
+ conv[6] = DIGIMOD(i, 1);
return &conv[1];
}
// Convert signed float to string (6 digit) with -1.234 / _0.000 / +1.234 format
- char* ftostr43sign(const float &x, char plus/*=' '*/) {
- long xx = x * 1000;
- conv[1] = xx ? MINUSOR(xx, plus) : ' ';
- conv[2] = DIGIMOD(xx, 1000);
+ char* ftostr43sign(const float &f, char plus/*=' '*/) {
+ long i = (f * 10000 + (f < 0 ? -5: 5)) / 10;
+ conv[1] = i ? MINUSOR(i, plus) : ' ';
+ conv[2] = DIGIMOD(i, 1000);
conv[3] = '.';
- conv[4] = DIGIMOD(xx, 100);
- conv[5] = DIGIMOD(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ conv[4] = DIGIMOD(i, 100);
+ conv[5] = DIGIMOD(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return &conv[1];
}
// Convert unsigned float to rj string with 12345 format
- char* ftostr5rj(const float &x) {
- const long xx = x < 0 ? -x : x;
- conv[2] = RJDIGIT(xx, 10000);
- conv[3] = RJDIGIT(xx, 1000);
- conv[4] = RJDIGIT(xx, 100);
- conv[5] = RJDIGIT(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ char* ftostr5rj(const float &f) {
+ const long i = ((f < 0 ? -f : f) * 10 + 5) / 10;
+ conv[2] = RJDIGIT(i, 10000);
+ conv[3] = RJDIGIT(i, 1000);
+ conv[4] = RJDIGIT(i, 100);
+ conv[5] = RJDIGIT(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return &conv[2];
}
// Convert signed float to string with +1234.5 format
- char* ftostr51sign(const float &x) {
- long xx = x * 10;
- conv[0] = MINUSOR(xx, '+');
- conv[1] = DIGIMOD(xx, 10000);
- conv[2] = DIGIMOD(xx, 1000);
- conv[3] = DIGIMOD(xx, 100);
- conv[4] = DIGIMOD(xx, 10);
+ char* ftostr51sign(const float &f) {
+ long i = (f * 100 + (f < 0 ? -5: 5)) / 10;
+ conv[0] = MINUSOR(i, '+');
+ conv[1] = DIGIMOD(i, 10000);
+ conv[2] = DIGIMOD(i, 1000);
+ conv[3] = DIGIMOD(i, 100);
+ conv[4] = DIGIMOD(i, 10);
conv[5] = '.';
- conv[6] = DIGIMOD(xx, 1);
+ conv[6] = DIGIMOD(i, 1);
return conv;
}
// Convert signed float to string with +123.45 format
- char* ftostr52sign(const float &x) {
- long xx = x * 100;
- conv[0] = MINUSOR(xx, '+');
- conv[1] = DIGIMOD(xx, 10000);
- conv[2] = DIGIMOD(xx, 1000);
- conv[3] = DIGIMOD(xx, 100);
+ char* ftostr52sign(const float &f) {
+ long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
+ conv[0] = MINUSOR(i, '+');
+ conv[1] = DIGIMOD(i, 10000);
+ conv[2] = DIGIMOD(i, 1000);
+ conv[3] = DIGIMOD(i, 100);
conv[4] = '.';
- conv[5] = DIGIMOD(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ conv[5] = DIGIMOD(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return conv;
}
// Convert unsigned float to string with 1234.56 format omitting trailing zeros
- char* ftostr62rj(const float &x) {
- const long xx = (x < 0 ? -x : x) * 100;
- conv[0] = RJDIGIT(xx, 100000);
- conv[1] = RJDIGIT(xx, 10000);
- conv[2] = RJDIGIT(xx, 1000);
- conv[3] = DIGIMOD(xx, 100);
+ char* ftostr62rj(const float &f) {
+ const long i = ((f < 0 ? -f : f) * 1000 + 5) / 10;
+ conv[0] = RJDIGIT(i, 100000);
+ conv[1] = RJDIGIT(i, 10000);
+ conv[2] = RJDIGIT(i, 1000);
+ conv[3] = DIGIMOD(i, 100);
conv[4] = '.';
- conv[5] = DIGIMOD(xx, 10);
- conv[6] = DIGIMOD(xx, 1);
+ conv[5] = DIGIMOD(i, 10);
+ conv[6] = DIGIMOD(i, 1);
return conv;
}
// Convert signed float to space-padded string with -_23.4_ format
- char* ftostr52sp(const float &x) {
- long xx = x * 100;
+ char* ftostr52sp(const float &f) {
+ long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
uint8_t dig;
- conv[1] = MINUSOR(xx, RJDIGIT(xx, 10000));
- conv[2] = RJDIGIT(xx, 1000);
- conv[3] = DIGIMOD(xx, 100);
+ conv[1] = MINUSOR(i, RJDIGIT(i, 10000));
+ conv[2] = RJDIGIT(i, 1000);
+ conv[3] = DIGIMOD(i, 100);
- if ((dig = xx % 10)) { // second digit after decimal point?
+ if ((dig = i % 10)) { // second digit after decimal point?
conv[4] = '.';
- conv[5] = DIGIMOD(xx, 10);
+ conv[5] = DIGIMOD(i, 10);
conv[6] = DIGIT(dig);
}
else {
- if ((dig = (xx / 10) % 10)) { // first digit after decimal point?
+ if ((dig = (i / 10) % 10)) { // first digit after decimal point?
conv[4] = '.';
conv[5] = DIGIT(dig);
}
@@ -307,9 +304,17 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOPGM(" (Aligned With");
#endif
#if Y_PROBE_OFFSET_FROM_EXTRUDER > 0
- SERIAL_ECHOPGM("-Back");
+ #if IS_SCARA
+ SERIAL_ECHOPGM("-Distal");
+ #else
+ SERIAL_ECHOPGM("-Back");
+ #endif
#elif Y_PROBE_OFFSET_FROM_EXTRUDER < 0
- SERIAL_ECHOPGM("-Front");
+ #if IS_SCARA
+ SERIAL_ECHOPGM("-Proximal");
+ #else
+ SERIAL_ECHOPGM("-Front");
+ #endif
#elif X_PROBE_OFFSET_FROM_EXTRUDER != 0
SERIAL_ECHOPGM("-Center");
#endif
@@ -341,9 +346,9 @@ void safe_delay(millis_t ms) {
#endif
#if ABL_PLANAR
const float diff[XYZ] = {
- stepper.get_axis_position_mm(X_AXIS) - current_position[X_AXIS],
- stepper.get_axis_position_mm(Y_AXIS) - current_position[Y_AXIS],
- stepper.get_axis_position_mm(Z_AXIS) - current_position[Z_AXIS]
+ planner.get_axis_position_mm(X_AXIS) - current_position[X_AXIS],
+ planner.get_axis_position_mm(Y_AXIS) - current_position[Y_AXIS],
+ planner.get_axis_position_mm(Z_AXIS) - current_position[Z_AXIS]
};
SERIAL_ECHOPGM("ABL Adjustment X");
if (diff[X_AXIS] > 0) SERIAL_CHAR('+');
@@ -381,7 +386,11 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOPGM("Mesh Bed Leveling");
if (planner.leveling_active) {
SERIAL_ECHOLNPGM(" (enabled)");
- SERIAL_ECHOPAIR("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position[X_AXIS], current_position[Y_AXIS], 1.0), '+'));
+ SERIAL_ECHOPAIR("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position[X_AXIS], current_position[Y_AXIS]
+ #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
+ , 1.0
+ #endif
+ ), '+'));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height) {
SERIAL_ECHOPAIR(" (", ftostr43sign(
diff --git a/Marlin/src/core/utility.h b/Marlin/src/core/utility.h
index 56931a7a0c4d..f4f2e7cf8065 100644
--- a/Marlin/src/core/utility.h
+++ b/Marlin/src/core/utility.h
@@ -57,13 +57,13 @@ void safe_delay(millis_t ms);
char* itostr3left(const int xx);
// Convert signed int to rj string with _123, -123, _-12, or __-1 format
- char *itostr4sign(const int x);
+ char* itostr4sign(const int x);
// Convert unsigned float to string with 1.23 format
char* ftostr12ns(const float &x);
// Convert signed float to fixed-length string with 023.45 / -23.45 format
- char* ftostr32(const float &x);
+ char* ftostr52(const float &x);
// Convert float to fixed-length string with +123.4 / -123.4 format
char* ftostr41sign(const float &x);
@@ -87,14 +87,14 @@ void safe_delay(millis_t ms);
char* ftostr62rj(const float &x);
// Convert float to rj string with 123 or -12 format
- FORCE_INLINE char *ftostr3(const float &x) { return itostr3((int)x); }
+ FORCE_INLINE char* ftostr3(const float &x) { return itostr3(int(x + (x < 0 ? -0.5f : 0.5f))); }
#if ENABLED(LCD_DECIMAL_SMALL_XY)
// Convert float to rj string with 1234, _123, 12.3, _1.2, -123, _-12, or -1.2 format
- char *ftostr4sign(const float &fx);
+ char* ftostr4sign(const float &fx);
#else
// Convert float to rj string with 1234, _123, -123, __12, _-12, ___1, or __-1 format
- FORCE_INLINE char *ftostr4sign(const float &x) { return itostr4sign((int)x); }
+ FORCE_INLINE char* ftostr4sign(const float &x) { return itostr4sign(int(x + (x < 0 ? -0.5f : 0.5f))); }
#endif
#endif // ULTRA_LCD
diff --git a/Marlin/src/feature/I2CPositionEncoder.cpp b/Marlin/src/feature/I2CPositionEncoder.cpp
index 7c80ff3a390d..d817f1400c6a 100644
--- a/Marlin/src/feature/I2CPositionEncoder.cpp
+++ b/Marlin/src/feature/I2CPositionEncoder.cpp
@@ -99,15 +99,15 @@ void I2CPositionEncoder::update() {
//the encoder likely lost its place when the error occured, so we'll reset and use the printer's
//idea of where it the axis is to re-initialise
- float position = stepper.get_axis_position_mm(encoderAxis);
- int32_t positionInTicks = position * get_ticks_unit();
+ const float pos = planner.get_axis_position_mm(encoderAxis);
+ int32_t positionInTicks = pos * get_ticks_unit();
//shift position from previous to current position
zeroOffset -= (positionInTicks - get_position());
#ifdef I2CPE_DEBUG
SERIAL_ECHOPGM("Current position is ");
- SERIAL_ECHOLN(position);
+ SERIAL_ECHOLN(pos);
SERIAL_ECHOPGM("Position in encoder ticks is ");
SERIAL_ECHOLN(positionInTicks);
@@ -134,7 +134,7 @@ void I2CPositionEncoder::update() {
#ifdef I2CPE_EC_THRESH_PROPORTIONAL
const millis_t deltaTime = positionTime - lastPositionTime;
- const uint32_t distance = abs(position - lastPosition),
+ const uint32_t distance = ABS(position - lastPosition),
speed = distance / deltaTime;
const float threshold = constrain((speed / 50), 1, 50) * ecThreshold;
#else
@@ -150,7 +150,7 @@ void I2CPositionEncoder::update() {
LOOP_L_N(i, I2CPE_ERR_ARRAY_SIZE) {
sum += err[i];
- if (i) diffSum += abs(err[i-1] - err[i]);
+ if (i) diffSum += ABS(err[i-1] - err[i]);
}
const int32_t error = int32_t(sum / (I2CPE_ERR_ARRAY_SIZE + 1)); //calculate average for error
@@ -163,7 +163,7 @@ void I2CPositionEncoder::update() {
//SERIAL_ECHOLN(error);
#ifdef I2CPE_ERR_THRESH_ABORT
- if (labs(error) > I2CPE_ERR_THRESH_ABORT * planner.axis_steps_per_mm[encoderAxis]) {
+ if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.axis_steps_per_mm[encoderAxis]) {
//kill("Significant Error");
SERIAL_ECHOPGM("Axis error greater than set threshold, aborting!");
SERIAL_ECHOLN(error);
@@ -175,13 +175,13 @@ void I2CPositionEncoder::update() {
if (errIdx == 0) {
// In order to correct for "error" but avoid correcting for noise and non-skips
// it must be > threshold and have a difference average of < 10 and be < 2000 steps
- if (labs(error) > threshold * planner.axis_steps_per_mm[encoderAxis] &&
- diffSum < 10 * (I2CPE_ERR_ARRAY_SIZE - 1) && labs(error) < 2000) { // Check for persistent error (skip)
+ if (ABS(error) > threshold * planner.axis_steps_per_mm[encoderAxis] &&
+ diffSum < 10 * (I2CPE_ERR_ARRAY_SIZE - 1) && ABS(error) < 2000) { // Check for persistent error (skip)
errPrst[errPrstIdx++] = error; // Error must persist for I2CPE_ERR_PRST_ARRAY_SIZE error cycles. This also serves to improve the average accuracy
if (errPrstIdx >= I2CPE_ERR_PRST_ARRAY_SIZE) {
float sumP = 0;
LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i];
- const int32_t errorP = int32_t(sumP * (1.0 / (I2CPE_ERR_PRST_ARRAY_SIZE)));
+ const int32_t errorP = int32_t(sumP * (1.0f / (I2CPE_ERR_PRST_ARRAY_SIZE)));
SERIAL_ECHO(axis_codes[encoderAxis]);
SERIAL_ECHOPAIR(" - err detected: ", errorP * planner.steps_to_mm[encoderAxis]);
SERIAL_ECHOLNPGM("mm; correcting!");
@@ -193,14 +193,14 @@ void I2CPositionEncoder::update() {
errPrstIdx = 0;
}
#else
- if (labs(error) > threshold * planner.axis_steps_per_mm[encoderAxis]) {
+ if (ABS(error) > threshold * planner.axis_steps_per_mm[encoderAxis]) {
//SERIAL_ECHOLN(error);
//SERIAL_ECHOLN(position);
thermalManager.babystepsTodo[encoderAxis] = -LROUND(error / 2);
}
#endif
- if (labs(error) > I2CPE_ERR_CNT_THRESH * planner.axis_steps_per_mm[encoderAxis]) {
+ if (ABS(error) > I2CPE_ERR_CNT_THRESH * planner.axis_steps_per_mm[encoderAxis]) {
const millis_t ms = millis();
if (ELAPSED(ms, nextErrorCountTime)) {
SERIAL_ECHOPAIR("Large error on ", axis_codes[encoderAxis]);
@@ -254,11 +254,11 @@ bool I2CPositionEncoder::passes_test(const bool report) {
float I2CPositionEncoder::get_axis_error_mm(const bool report) {
float target, actual, error;
- target = stepper.get_axis_position_mm(encoderAxis);
+ target = planner.get_axis_position_mm(encoderAxis);
actual = mm_from_count(position);
error = actual - target;
- if (labs(error) > 10000) error = 0; // ?
+ if (ABS(error) > 10000) error = 0; // ?
if (report) {
SERIAL_ECHO(axis_codes[encoderAxis]);
@@ -293,7 +293,7 @@ int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) {
error = (encoderCountInStepperTicksScaled - target);
//suppress discontinuities (might be caused by bad I2C readings...?)
- bool suppressOutput = (labs(error - errorPrev) > 100);
+ const bool suppressOutput = (ABS(error - errorPrev) > 100);
if (report) {
SERIAL_ECHO(axis_codes[encoderAxis]);
@@ -349,18 +349,18 @@ bool I2CPositionEncoder::test_axis() {
ec = false;
LOOP_NA(i) {
- startCoord[i] = stepper.get_axis_position_mm((AxisEnum)i);
- endCoord[i] = stepper.get_axis_position_mm((AxisEnum)i);
+ startCoord[i] = planner.get_axis_position_mm((AxisEnum)i);
+ endCoord[i] = planner.get_axis_position_mm((AxisEnum)i);
}
startCoord[encoderAxis] = startPosition;
endCoord[encoderAxis] = endPosition;
- stepper.synchronize();
+ planner.synchronize();
- planner.buffer_line(startCoord[X_AXIS],startCoord[Y_AXIS],startCoord[Z_AXIS],
- stepper.get_axis_position_mm(E_AXIS), feedrate, 0);
- stepper.synchronize();
+ planner.buffer_line(startCoord[X_AXIS], startCoord[Y_AXIS], startCoord[Z_AXIS],
+ planner.get_axis_position_mm(E_AXIS), feedrate, 0);
+ planner.synchronize();
// if the module isn't currently trusted, wait until it is (or until it should be if things are working)
if (!trusted) {
@@ -371,8 +371,8 @@ bool I2CPositionEncoder::test_axis() {
if (trusted) { // if trusted, commence test
planner.buffer_line(endCoord[X_AXIS], endCoord[Y_AXIS], endCoord[Z_AXIS],
- stepper.get_axis_position_mm(E_AXIS), feedrate, 0);
- stepper.synchronize();
+ planner.get_axis_position_mm(E_AXIS), feedrate, 0);
+ planner.synchronize();
}
return trusted;
@@ -408,34 +408,34 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
travelDistance = endDistance - startDistance;
LOOP_NA(i) {
- startCoord[i] = stepper.get_axis_position_mm((AxisEnum)i);
- endCoord[i] = stepper.get_axis_position_mm((AxisEnum)i);
+ startCoord[i] = planner.get_axis_position_mm((AxisEnum)i);
+ endCoord[i] = planner.get_axis_position_mm((AxisEnum)i);
}
startCoord[encoderAxis] = startDistance;
endCoord[encoderAxis] = endDistance;
- LOOP_L_N(i, iter) {
- stepper.synchronize();
+ planner.synchronize();
- planner.buffer_line(startCoord[X_AXIS],startCoord[Y_AXIS],startCoord[Z_AXIS],
- stepper.get_axis_position_mm(E_AXIS), feedrate, 0);
- stepper.synchronize();
+ LOOP_L_N(i, iter) {
+ planner.buffer_line(startCoord[X_AXIS], startCoord[Y_AXIS], startCoord[Z_AXIS],
+ planner.get_axis_position_mm(E_AXIS), feedrate, 0);
+ planner.synchronize();
delay(250);
startCount = get_position();
//do_blocking_move_to(endCoord[X_AXIS],endCoord[Y_AXIS],endCoord[Z_AXIS]);
- planner.buffer_line(endCoord[X_AXIS],endCoord[Y_AXIS],endCoord[Z_AXIS],
- stepper.get_axis_position_mm(E_AXIS), feedrate, 0);
- stepper.synchronize();
+ planner.buffer_line(endCoord[X_AXIS], endCoord[Y_AXIS], endCoord[Z_AXIS],
+ planner.get_axis_position_mm(E_AXIS), feedrate, 0);
+ planner.synchronize();
//Read encoder distance
delay(250);
stopCount = get_position();
- travelledDistance = mm_from_count(abs(stopCount - startCount));
+ travelledDistance = mm_from_count(ABS(stopCount - startCount));
SERIAL_ECHOPAIR("Attempted to travel: ", travelDistance);
SERIAL_ECHOLNPGM("mm.");
diff --git a/Marlin/src/feature/I2CPositionEncoder.h b/Marlin/src/feature/I2CPositionEncoder.h
index 4ed5c7883605..224e0da8b22d 100644
--- a/Marlin/src/feature/I2CPositionEncoder.h
+++ b/Marlin/src/feature/I2CPositionEncoder.h
@@ -133,16 +133,12 @@ class I2CPositionEncoder {
nextErrorCountTime = 0,
lastErrorTime;
- //double positionMm; //calculate
-
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
uint8_t errIdx = 0, errPrstIdx = 0;
int err[I2CPE_ERR_ARRAY_SIZE] = { 0 },
errPrst[I2CPE_ERR_PRST_ARRAY_SIZE] = { 0 };
#endif
- //float positionMm; //calculate
-
public:
void init(const uint8_t address, const AxisEnum axis);
void reset();
diff --git a/Marlin/src/feature/Max7219_Debug_LEDs.cpp b/Marlin/src/feature/Max7219_Debug_LEDs.cpp
index 62fa049c89ac..d9e7a8964319 100644
--- a/Marlin/src/feature/Max7219_Debug_LEDs.cpp
+++ b/Marlin/src/feature/Max7219_Debug_LEDs.cpp
@@ -22,11 +22,9 @@
/**
* This module is off by default, but can be enabled to facilitate the display of
- * extra debug information during code development. It assumes the existence of a
- * Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
- * http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
+ * extra debug information during code development.
*
- * Just connect up +5v and GND to give it power, then connect up the pins assigned
+ * Just connect up 5V and GND to give it power, then connect up the pins assigned
* in Configuration_adv.h. For example, on the Re-ARM you could use:
*
* #define MAX7219_CLK_PIN 77
@@ -35,324 +33,527 @@
*
* Max7219_init() is called automatically at startup, and then there are a number of
* support functions available to control the LEDs in the 8x8 grid.
- *
- * void Max7219_init();
- * void Max7219_PutByte(uint8_t data);
- * void Max7219(uint8_t reg, uint8_t data);
- * void Max7219_LED_On(uint8_t col, uint8_t row);
- * void Max7219_LED_Off(uint8_t col, uint8_t row);
- * void Max7219_LED_Toggle(uint8_t col, uint8_t row);
- * void Max7219_Clear_Row(uint8_t row);
- * void Max7219_Clear_Column(uint8_t col);
- * void Max7219_Set_Row(uint8_t row, uint8_t val);
- * void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
- * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
- * void Max7219_Set_Column(uint8_t col, uint8_t val);
- * void Max7219_idle_tasks();
*/
-#include "../inc/MarlinConfig.h"
+#include "../inc/MarlinConfigPre.h"
#if ENABLED(MAX7219_DEBUG)
+#define MAX7219_ERRORS // Disable to save 406 bytes of Program Memory
+
#include "Max7219_Debug_LEDs.h"
#include "../module/planner.h"
#include "../module/stepper.h"
#include "../Marlin.h"
+#include "../HAL/Delay.h"
-static uint8_t LEDs[8] = { 0 };
+uint8_t LEDs[8 * (MAX7219_NUMBER_UNITS)] = { 0 };
+
+#ifndef MAX7219_ROTATE
+ #define MAX7219_ROTATE 0
+#endif
#ifdef CPU_32_BIT
- #define MS_DELAY() delayMicroseconds(7) // 32-bit processors need a delay to stabilize the signal
+ // Approximate a 1µs delay on 32-bit ARM
+ #define SIG_DELAY() DELAY_US(1)
#else
- #define MS_DELAY() DELAY_3_NOP
+ // Delay for 0.1875µs (16MHz AVR) or 0.15µs (20MHz AVR)
+ #define SIG_DELAY() DELAY_NS(188)
#endif
void Max7219_PutByte(uint8_t data) {
- CRITICAL_SECTION_START
+ #ifndef CPU_32_BIT
+ CRITICAL_SECTION_START;
+ #endif
for (uint8_t i = 8; i--;) {
- MS_DELAY();
+ SIG_DELAY();
WRITE(MAX7219_CLK_PIN, LOW); // tick
- MS_DELAY();
+ SIG_DELAY();
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
- MS_DELAY();
+ SIG_DELAY();
WRITE(MAX7219_CLK_PIN, HIGH); // tock
- MS_DELAY();
+ SIG_DELAY();
data <<= 1;
}
- CRITICAL_SECTION_END
+ #ifndef CPU_32_BIT
+ CRITICAL_SECTION_END;
+ #endif
+}
+void Max7219_pulse_load() {
+ SIG_DELAY();
+ WRITE(MAX7219_LOAD_PIN, LOW); // tell the chip to load the data
+ SIG_DELAY();
+ WRITE(MAX7219_LOAD_PIN, HIGH);
+ SIG_DELAY();
}
void Max7219(const uint8_t reg, const uint8_t data) {
- MS_DELAY();
- CRITICAL_SECTION_START
- WRITE(MAX7219_LOAD_PIN, LOW); // begin
- MS_DELAY();
+ SIG_DELAY();
+ #ifndef CPU_32_BIT
+ CRITICAL_SECTION_START;
+ #endif
+ SIG_DELAY();
Max7219_PutByte(reg); // specify register
- MS_DELAY();
+ SIG_DELAY();
Max7219_PutByte(data); // put data
- MS_DELAY();
- WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
- MS_DELAY();
- WRITE(MAX7219_LOAD_PIN, HIGH);
- CRITICAL_SECTION_END
- MS_DELAY();
+ CRITICAL_SECTION_END;
}
-void Max7219_LED_Set(const uint8_t col, const uint8_t row, const bool on) {
- if (row > 7 || col > 7) {
- SERIAL_ECHOPAIR("??? Max7219_LED_Set(", (int)row);
- SERIAL_ECHOPAIR(",", (int)col);
- SERIAL_ECHOLNPGM(")");
- return;
+#if ENABLED(MAX7219_NUMERIC)
+
+ // Draw an integer with optional leading zeros and optional decimal point
+ void Max7219_Print(const uint8_t start, int16_t value, uint8_t size, const bool leadzero=false, bool dec=false) {
+ constexpr uint8_t led_numeral[10] = { 0x7E, 0x60, 0x6D, 0x79, 0x63, 0x5B, 0x5F, 0x70, 0x7F, 0x7A },
+ led_decimal = 0x80, led_minus = 0x01;
+
+ bool blank = false, neg = value < 0;
+ if (neg) value *= -1;
+ while (size--) {
+ const bool minus = neg && blank;
+ if (minus) neg = false;
+ Max7219(
+ max7219_reg_digit0 + start + size,
+ minus ? led_minus : blank ? 0x00 : led_numeral[value % 10] | (dec ? led_decimal : 0x00)
+ );
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
+ value /= 10;
+ if (!value && !leadzero) blank = true;
+ dec = false;
+ }
}
- if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
- if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
- Max7219(8 - row, LEDs[row]);
-}
-void Max7219_LED_On(const uint8_t col, const uint8_t row) {
- if (row > 7 || col > 7) {
- SERIAL_ECHOPAIR("??? Max7219_LED_On(", (int)col);
- SERIAL_ECHOPAIR(",", (int)row);
- SERIAL_ECHOLNPGM(")");
- return;
+ // Draw a float with a decimal point and optional digits
+ void Max7219_Print(const uint8_t start, const float value, const uint8_t pre_size, const uint8_t post_size, const bool leadzero=false) {
+ if (pre_size) Max7219_Print(start, value, pre_size, leadzero, !!post_size);
+ if (post_size) {
+ const int16_t after = ABS(value) * (10 ^ post_size);
+ Max7219_Print(start + pre_size, after, post_size, true);
+ }
}
- Max7219_LED_Set(col, row, true);
+
+#endif // MAX7219_NUMERIC
+
+inline void Max7219_Error(const char * const func, const int32_t v1, const int32_t v2=-1) {
+ #if ENABLED(MAX7219_ERRORS)
+ SERIAL_ECHOPGM("??? ");
+ serialprintPGM(func);
+ SERIAL_CHAR('(');
+ SERIAL_ECHO(v1);
+ if (v2 > 0) SERIAL_ECHOPAIR(", ", v2);
+ SERIAL_CHAR(')');
+ SERIAL_EOL();
+ #else
+ UNUSED(func); UNUSED(v1); UNUSED(v2);
+ #endif
}
-void Max7219_LED_Off(const uint8_t col, const uint8_t row) {
- if (row > 7 || col > 7) {
- SERIAL_ECHOPAIR("??? Max7219_LED_Off(", (int)row);
- SERIAL_ECHOPAIR(",", (int)col);
- SERIAL_ECHOLNPGM(")");
- return;
+/**
+ * uint32_t flipped(const uint32_t bits, const uint8_t n_bytes) operates on the number
+ * of bytes specified in n_bytes. The lower order bits of the supplied bits are flipped.
+ * flipped( x, 1) flips the low 8 bits of x.
+ * flipped( x, 2) flips the low 16 bits of x.
+ * flipped( x, 3) flips the low 24 bits of x.
+ * flipped( x, 4) flips the low 32 bits of x.
+ */
+
+inline uint32_t flipped(const uint32_t bits, const uint8_t n_bytes) {
+ uint32_t mask = 1, outbits = 0;
+ for (uint8_t b = 0; b < n_bytes * 8; b++) {
+ outbits = (outbits << 1);
+ if (bits & mask)
+ outbits |= 1;
+ mask <<= 1;
}
- Max7219_LED_Set(col, row, false);
+ return outbits;
}
-void Max7219_LED_Toggle(const uint8_t col, const uint8_t row) {
- if (row > 7 || col > 7) {
- SERIAL_ECHOPAIR("??? Max7219_LED_Toggle(", (int)row);
- SERIAL_ECHOPAIR(",", (int)col);
- SERIAL_ECHOLNPGM(")");
- return;
- }
- if (TEST(LEDs[row], col))
- Max7219_LED_Off(col, row);
- else
- Max7219_LED_On(col, row);
+// Modify a single LED bit and send the changed line
+void Max7219_LED_Set(const uint8_t x, const uint8_t y, const bool on) {
+ if (x > (MAX7219_X_LEDS - 1) || y > (MAX7219_Y_LEDS - 1)) return Max7219_Error(PSTR("Max7219_LED_Set"), x, y);
+ if (BIT_7219(x, y) == on) return;
+ XOR_7219(x, y);
+ SEND_7219(MAX7219_UPDATE_AXIS);
}
-void Max7219_Clear_Column(const uint8_t col) {
- if (col > 7) {
- SERIAL_ECHOPAIR("??? Max7219_Clear_Column(", (int)col);
- SERIAL_ECHOLNPGM(")");
- return;
+void Max7219_LED_On(const uint8_t x, const uint8_t y) {
+ if (x > (MAX7219_X_LEDS - 1) || y > (MAX7219_Y_LEDS - 1)) return Max7219_Error(PSTR("Max7219_LED_On"), x, y);
+ Max7219_LED_Set(x, y, true);
+}
+
+void Max7219_LED_Off(const uint8_t x, const uint8_t y) {
+ if (x > (MAX7219_X_LEDS - 1) || y > (MAX7219_Y_LEDS - 1)) return Max7219_Error(PSTR("Max7219_LED_Off"), x, y);
+ Max7219_LED_Set(x, y, false);
+}
+
+void Max7219_LED_Toggle(const uint8_t x, const uint8_t y) {
+ if (x > (MAX7219_X_LEDS - 1) || y > (MAX7219_Y_LEDS - 1)) return Max7219_Error(PSTR("Max7219_LED_Toggle"), x, y);
+ Max7219_LED_Set(x, y, !BIT_7219(x, y));
+}
+
+inline void _Max7219_Set_Digit_Segments(const uint8_t digit, const uint8_t val) {
+ LEDs[digit] = val;
+ SEND_7219(digit);
+}
+
+/**
+ * void Max7219_Set_Row( const uint8_t col, const uint32_t val) plots the low order bits of
+ * val to the specified row of the Max7219 matrix. With 4 Max7219 units in the chain, it
+ * is possible to display an entire 32-bit number with one call to the function (if appropriately
+ * orientated).
+ */
+void Max7219_Set_Row(const uint8_t row, const uint32_t val) {
+ if (row >= MAX7219_Y_LEDS) return Max7219_Error(PSTR("Max7219_Set_Row"), row);
+ uint32_t mask = 0x0000001;
+ for (uint8_t x = 0; x < MAX7219_X_LEDS; x++) {
+ if (val & mask)
+ SET_PIXEL_7219((MAX7219_X_LEDS-1-x), row);
+ else
+ CLEAR_PIXEL_7219((MAX7219_X_LEDS-1-x), row);
+ mask <<= 1;
}
- LEDs[col] = 0;
- Max7219(8 - col, LEDs[col]);
+
+ #if _ROT == 90 || _ROT == 270
+ for (uint8_t x = 0; x < 8; x++)
+ SEND_7219(x); // force all columns out to the Max7219 chips and strobe them
+ #else
+ SEND_7219(row); // force the single column out to the Max7219 chips and strobe them
+ #endif
}
void Max7219_Clear_Row(const uint8_t row) {
- if (row > 7) {
- SERIAL_ECHOPAIR("??? Max7219_Clear_Row(", (int)row);
- SERIAL_ECHOLNPGM(")");
- return;
- }
- for (uint8_t c = 0; c <= 7; c++)
- Max7219_LED_Off(c, row);
+ if (row > 7) return Max7219_Error(PSTR("Max7219_Clear_Row"), row);
+ #if _ROT == 90 || _ROT == 270
+ for (uint8_t col = 0; col < 8; col++) Max7219_LED_Off(col, row);
+ #else
+ _Max7219_Set_Digit_Segments(row, 0);
+ #endif
}
-void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
- if (row > 7) {
- SERIAL_ECHOPAIR("??? Max7219_Set_Row(", (int)row);
- SERIAL_ECHOPAIR(",", (int)val);
- SERIAL_ECHOLNPGM(")");
- return;
- }
- for (uint8_t b = 0; b <= 7; b++)
- if (TEST(val, b))
- Max7219_LED_On(7 - b, row);
+/**
+ * void Max7219_Set_Column( const uint8_t col, const uint32_t val) plots the low order bits of
+ * val to the specified column of the Max7219 matrix. With 4 Max7219 units in the chain, it
+ * is possible to display an entire 32-bit number with one call to the function (if appropriately
+ * orientated).
+ */
+void Max7219_Set_Column(const uint8_t col, const uint32_t val) {
+ if (col >= MAX7219_X_LEDS) return Max7219_Error(PSTR("Max7219_Set_Column"), col);
+ uint32_t mask = 0x0000001;
+ for (uint8_t y = 0; y < MAX7219_Y_LEDS; y++) {
+ if (val & mask)
+ SET_PIXEL_7219(col, MAX7219_Y_LEDS-1-y);
else
- Max7219_LED_Off(7 - b, row);
+ CLEAR_PIXEL_7219(col, MAX7219_Y_LEDS-1-y);
+ mask <<= 1;
+ }
+ #if _ROT == 90 || _ROT == 270
+ SEND_7219(col); // force the column out to the Max7219 chips and strobe them
+ #else
+ for (uint8_t yy = 0; yy < 8; yy++)
+ SEND_7219(yy); // force all columns out to the Max7219 chips and strobe them
+ #endif
}
-void Max7219_Set_2_Rows(const uint8_t row, const uint16_t val) {
- if (row > 6) {
- SERIAL_ECHOPAIR("??? Max7219_Set_2_Rows(", (int)row);
- SERIAL_ECHOPAIR(",", (int)val);
- SERIAL_ECHOLNPGM(")");
- return;
- }
- Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
- Max7219_Set_Row(row + 0, (val ) & 0xFF);
+void Max7219_Clear_Column(const uint8_t col) {
+ if (col >= MAX7219_X_LEDS) return Max7219_Error(PSTR("Max7219_Clear_Column"), col);
+
+ for (uint8_t yy = 0; yy < MAX7219_Y_LEDS; yy++)
+ CLEAR_PIXEL_7219(col, yy);
+
+ #if _ROT == 90 || _ROT == 270
+ SEND_7219(col); // force the column out to the Max7219 chips and strobe them
+ #else
+ for (uint8_t y = 0; y < 8; y++)
+ SEND_7219(y); // force all columns out to the Max7219 chips and strobe them
+ #endif
}
-void Max7219_Set_4_Rows(const uint8_t row, const uint32_t val) {
- if (row > 4) {
- SERIAL_ECHOPAIR("??? Max7219_Set_4_Rows(", (int)row);
- SERIAL_ECHOPAIR(",", (long)val);
- SERIAL_ECHOLNPGM(")");
- return;
+void Max7219_Clear() {
+ for (uint8_t i = 0; i <= 7; i++) { // Clear LED bitmap
+ for (uint8_t j = 0; j < MAX7219_NUMBER_UNITS; j++)
+ LEDs[i + j * 8] = 0x00;
+ SEND_7219(i);
}
- Max7219_Set_Row(row + 3, (val >> 24) & 0xFF);
- Max7219_Set_Row(row + 2, (val >> 16) & 0xFF);
- Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
- Max7219_Set_Row(row + 0, (val ) & 0xFF);
+
}
-void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
- if (col > 7) {
- SERIAL_ECHOPAIR("??? Max7219_Column(", (int)col);
- SERIAL_ECHOPAIR(",", (int)val);
- SERIAL_ECHOLNPGM(")");
- return;
- }
- LEDs[col] = val;
- Max7219(8 - col, LEDs[col]);
+void Max7219_Set_Rows_16bits(const uint8_t y, uint32_t val) {
+ #if MAX7219_X_LEDS == 8
+ if (y > MAX7219_Y_LEDS - 2) return Max7219_Error(PSTR("Max7219_Set_Rows_16bits"), y, val);
+ Max7219_Set_Row(y + 1, val); val >>= 8;
+ Max7219_Set_Row(y + 0, val);
+ #else // at least 16 bits on each row
+ if (y > MAX7219_Y_LEDS - 1) return Max7219_Error(PSTR("Max7219_Set_Rows_16bits"), y, val);
+ Max7219_Set_Row(y, val);
+ #endif
+}
+
+void Max7219_Set_Rows_32bits(const uint8_t y, uint32_t val) {
+ #if MAX7219_X_LEDS == 8
+ if (y > MAX7219_Y_LEDS - 4) return Max7219_Error(PSTR("Max7219_Set_Rows_32bits"), y, val);
+ Max7219_Set_Row(y + 3, val); val >>= 8;
+ Max7219_Set_Row(y + 2, val); val >>= 8;
+ Max7219_Set_Row(y + 1, val); val >>= 8;
+ Max7219_Set_Row(y + 0, val);
+ #elif MAX7219_X_LEDS == 16
+ if (y > MAX7219_Y_LEDS - 2) return Max7219_Error(PSTR("Max7219_Set_Rows_32bits"), y, val);
+ Max7219_Set_Row(y + 1, val); val >>= 16;
+ Max7219_Set_Row(y + 0, val);
+ #else // at least 24 bits on each row. In the 3 matrix case, just display the low 24 bits
+ if (y > MAX7219_Y_LEDS - 1) return Max7219_Error(PSTR("Max7219_Set_Rows_32bits"), y, val);
+ Max7219_Set_Row(y, val);
+ #endif
+}
+
+void Max7219_Set_Columns_16bits(const uint8_t x, uint32_t val) {
+ #if MAX7219_Y_LEDS == 8
+ if (x > MAX7219_X_LEDS - 2) return Max7219_Error(PSTR("Max7219_Set_Columns_16bits"), x, val);
+ Max7219_Set_Column(x + 0, val); val >>= 8;
+ Max7219_Set_Column(x + 1, val);
+ #else // at least 16 bits in each column
+ if (x > MAX7219_X_LEDS - 1) return Max7219_Error(PSTR("Max7219_Set_Columns_16bits"), x, val);
+ Max7219_Set_Column(x, val);
+ #endif
+}
+
+void Max7219_Set_Columns_32bits(const uint8_t x, uint32_t val) {
+ #if MAX7219_Y_LEDS == 8
+ if (x > MAX7219_X_LEDS - 4) return Max7219_Error(PSTR("Max7219_Set_Rows_32bits"), x, val);
+ Max7219_Set_Column(x + 3, val); val >>= 8;
+ Max7219_Set_Column(x + 2, val); val >>= 8;
+ Max7219_Set_Column(x + 1, val); val >>= 8;
+ Max7219_Set_Column(x + 0, val);
+ #elif MAX7219_Y_LEDS == 16
+ if (x > MAX7219_X_LEDS - 2) return Max7219_Error(PSTR("Max7219_Set_Rows_32bits"), x, val);
+ Max7219_Set_Column(x + 1, val); val >>= 16;
+ Max7219_Set_Column(x + 0, val);
+ #else // at least 24 bits on each row. In the 3 matrix case, just display the low 24 bits
+ if (x > MAX7219_X_LEDS - 1) return Max7219_Error(PSTR("Max7219_Set_Rows_32bits"), x, val);
+ Max7219_Set_Column(x, val);
+ #endif
}
void Max7219_register_setup() {
- //initiation of the max 7219
- Max7219(max7219_reg_scanLimit, 0x07);
- Max7219(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
- Max7219(max7219_reg_shutdown, 0x01); // not in shutdown mode
- Max7219(max7219_reg_displayTest, 0x00); // no display test
- Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
+ // Initialize the Max7219
+ for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
+ Max7219(max7219_reg_scanLimit, 0x07);
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
+
+ for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
+ Max7219(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
+
+ for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
+ Max7219(max7219_reg_shutdown, 0x01); // not in shutdown mode
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
+
+ for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
+ Max7219(max7219_reg_displayTest, 0x00); // no display test
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
+
+ for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
+ Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
// range: 0x00 to 0x0F
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
}
-void Max7219_init() {
- uint8_t i, x, y;
+#ifdef MAX7219_INIT_TEST
+#if (MAX7219_INIT_TEST + 0) == 2
+
+ inline void Max7219_spiral(const bool on, const uint16_t del) {
+ constexpr int8_t way[] = { 1, 0, 0, 1, -1, 0, 0, -1 };
+ int8_t px = 0, py = 0, dir = 0;
+ for (uint8_t i = MAX7219_X_LEDS * MAX7219_Y_LEDS; i--;) {
+ Max7219_LED_Set(px, py, on);
+ delay(del);
+ const int8_t x = px + way[dir], y = py + way[dir + 1];
+ if (!WITHIN(x, 0, MAX7219_X_LEDS-1) || !WITHIN(y, 0, MAX7219_Y_LEDS-1) || BIT_7219(x, y) == on) dir = (dir + 2) & 0x7;
+ px += way[dir]; py += way[dir + 1];
+ }
+ }
+#else
+
+ inline void Max7219_sweep(const int8_t dir, const uint16_t ms, const bool on) {
+ uint8_t x = dir > 0 ? 0 : MAX7219_X_LEDS-1;
+ for (uint8_t i = MAX7219_X_LEDS; i--; x += dir) {
+ Max7219_Set_Column(x, on ? 0xFFFFFFFF : 0x00000000);
+ delay(ms);
+ }
+ }
+
+#endif
+#endif // MAX7219_INIT_TEST
+
+void Max7219_init() {
SET_OUTPUT(MAX7219_DIN_PIN);
SET_OUTPUT(MAX7219_CLK_PIN);
-
OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
delay(1);
Max7219_register_setup();
- for (i = 0; i <= 7; i++) { // empty registers, turn all LEDs off
+ for (uint8_t i = 0; i <= 7; i++) { // Empty registers to turn all LEDs off
LEDs[i] = 0x00;
- Max7219(i + 1, 0);
+ Max7219(max7219_reg_digit0 + i, 0);
+ Max7219_pulse_load(); // tell the chips to load the clocked out data
}
- for (x = 0; x <= 7; x++) // Do an aesthetically pleasing pattern to fully test
- for (y = 0; y <= 7; y++) { // the Max7219 module and LEDs. First, turn them
- Max7219_LED_On(y, x); // all on.
- delay(3);
- }
+ #ifdef MAX7219_INIT_TEST
+ #if (MAX7219_INIT_TEST + 0) == 2
+ Max7219_spiral(true, 8);
+ delay(150);
+ Max7219_spiral(false, 8);
+ #else
+ // Do an aesthetically-pleasing pattern to fully test the Max7219 module and LEDs.
+ // Light up and turn off columns, both forward and backward.
+ Max7219_sweep(1, 20, true);
+ Max7219_sweep(1, 20, false);
+ delay(150);
+ Max7219_sweep(-1, 20, true);
+ Max7219_sweep(-1, 20, false);
+ #endif
+ #endif
+}
- for (x = 0; x <= 7; x++) // Now, turn them all off.
- for (y = 0; y <= 7; y++) {
- Max7219_LED_Off(y, x);
- delay(3); // delay() is OK here. Max7219_init() is only called from
- } // setup() and nothing is running yet.
+/**
+ * This code demonstrates some simple debugging using a single 8x8 LED Matrix. If your feature could
+ * benefit from matrix display, add its code here. Very little processing is required, so the 7219 is
+ * ideal for debugging when realtime feedback is important but serial output can't be used.
+ */
- delay(150);
+// Apply changes to update a marker
+inline void Max7219_Mark16(const uint8_t y, const uint8_t v1, const uint8_t v2) {
+ #if MAX7219_X_LEDS == 8
+ #if MAX7219_Y_LEDS == 8
+ Max7219_LED_Off(v1 & 0x7, y + (v1 >= 8));
+ Max7219_LED_On(v2 & 0x7, y + (v2 >= 8));
+ #else
+ Max7219_LED_Off(y, v1 & 0xF); // The Max7219 Y-Axis has at least 16 LED's. So use a single column
+ Max7219_LED_On(y, v2 & 0xF);
+ #endif
+ #else // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
+ Max7219_LED_Off(v1 & 0xf, y);
+ Max7219_LED_On(v2 & 0xf, y);
+ #endif
+}
- for (x = 8; x--;) // Now, do the same thing from the opposite direction
- for (y = 0; y <= 7; y++) {
- Max7219_LED_On(y, x);
- delay(2);
- }
+// Apply changes to update a tail-to-head range
+inline void Max7219_Range16(const uint8_t y, const uint8_t ot, const uint8_t nt, const uint8_t oh, const uint8_t nh) {
+ #if MAX7219_X_LEDS == 8
+ #if MAX7219_Y_LEDS == 8
+ if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
+ Max7219_LED_Off(n & 0x7, y + (n >= 8));
+ if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
+ Max7219_LED_On(n & 0x7, y + (n >= 8));
+ #else // The Max7219 Y-Axis has at least 16 LED's. So use a single column
+ if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
+ Max7219_LED_Off(y, n & 0xF);
+ if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
+ Max7219_LED_On(y, n & 0xF);
+ #endif
+ #else // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
+ if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
+ Max7219_LED_Off(n & 0xf, y);
+ if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
+ Max7219_LED_On(n & 0xf, y);
+ #endif
+}
- for (x = 8; x--;)
- for (y = 0; y <= 7; y++) {
- Max7219_LED_Off(y, x);
- delay(2);
- }
+// Apply changes to update a quantity
+inline void Max7219_Quantity16(const uint8_t y, const uint8_t ov, const uint8_t nv) {
+ for (uint8_t i = MIN(nv, ov); i < MAX(nv, ov); i++)
+ #if MAX7219_X_LEDS == 8
+ #if MAX7219_Y_LEDS == 8
+ Max7219_LED_Set(i >> 1, y + (i & 1), nv >= ov); // single 8x8 LED matrix. Use two lines to get 16 LED's
+ #else
+ Max7219_LED_Set(y, i, nv >= ov); // The Max7219 Y-Axis has at least 16 LED's. So use a single column
+ #endif
+ #else
+ Max7219_LED_Set(i, y, nv >= ov); // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
+ #endif
}
-/**
- * These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
- * There is very little CPU burden added to the system by displaying information within the idle()
- * task.
- *
- * But with that said, if your debugging can be facilitated by making calls into the library from
- * other places in the code, feel free to do it. The CPU burden for a few calls to toggle an LED
- * or clear a row is not very significant.
- */
void Max7219_idle_tasks() {
- #if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
- CRITICAL_SECTION_START
- #if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_QUEUE
+ #define MAX7219_USE_HEAD (defined(MAX7219_DEBUG_PLANNER_HEAD) || defined(MAX7219_DEBUG_PLANNER_QUEUE))
+ #define MAX7219_USE_TAIL (defined(MAX7219_DEBUG_PLANNER_TAIL) || defined(MAX7219_DEBUG_PLANNER_QUEUE))
+ #if MAX7219_USE_HEAD || MAX7219_USE_TAIL
+ #ifndef CPU_32_BIT
+ CRITICAL_SECTION_START;
+ #endif
+ #if MAX7219_USE_HEAD
const uint8_t head = planner.block_buffer_head;
#endif
- #if MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
+ #if MAX7219_USE_TAIL
const uint8_t tail = planner.block_buffer_tail;
#endif
- CRITICAL_SECTION_END
+ #ifndef CPU_32_BIT
+ CRITICAL_SECTION_END;
+ #endif
#endif
-
- static uint16_t refresh_cnt = 0; // The Max7219 circuit boards available for several dollars on eBay
- if (refresh_cnt++ > 50000) { // are vulnerable to electrical noise, especially with long wires
- Max7219_register_setup(); // next to high current wires. If the display becomes corrupted due
- Max7219_LED_Toggle(7, 0); // to electrical noise, this will fix it within a couple of seconds.
- refresh_cnt = 0;
- }
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
+ static uint8_t refresh_cnt; // = 0
+ constexpr uint16_t refresh_limit = 5;
static millis_t next_blink = 0;
- if (ELAPSED(millis(), next_blink)) {
- Max7219_LED_Toggle(7, 7);
- next_blink = millis() + 750;
- }
+ const millis_t ms = millis();
+ const bool do_blink = ELAPSED(ms, next_blink);
+ #else
+ static uint16_t refresh_cnt; // = 0
+ constexpr bool do_blink = true;
+ constexpr uint16_t refresh_limit = 50000;
#endif
- #ifdef MAX7219_DEBUG_STEPPER_HEAD
- static int16_t last_head_cnt = 0;
- if (last_head_cnt != head) {
- if (last_head_cnt < 8)
- Max7219_LED_Off(MAX7219_DEBUG_STEPPER_HEAD, last_head_cnt);
- else
- Max7219_LED_Off(MAX7219_DEBUG_STEPPER_HEAD + 1, last_head_cnt - 8);
+ // Some Max7219 units are vulnerable to electrical noise, especially
+ // with long wires next to high current wires. If the display becomes
+ // corrupted, this will fix it within a couple seconds.
+ if (do_blink && ++refresh_cnt >= refresh_limit) {
+ refresh_cnt = 0;
+ Max7219_register_setup();
+ }
- last_head_cnt = head;
- if (head < 8)
- Max7219_LED_On(MAX7219_DEBUG_STEPPER_HEAD, head);
- else
- Max7219_LED_On(MAX7219_DEBUG_STEPPER_HEAD + 1, head - 8);
+ #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
+ if (do_blink) {
+ Max7219_LED_Toggle(MAX7219_X_LEDS - 1, MAX7219_Y_LEDS - 1);
+ next_blink = ms + 1000;
}
#endif
- #ifdef MAX7219_DEBUG_STEPPER_TAIL
- static int16_t last_tail_cnt = 0;
- if (last_tail_cnt != tail) {
- if (last_tail_cnt < 8)
- Max7219_LED_Off(MAX7219_DEBUG_STEPPER_TAIL, last_tail_cnt);
- else
- Max7219_LED_Off(MAX7219_DEBUG_STEPPER_TAIL + 1, last_tail_cnt - 8);
+ #if defined(MAX7219_DEBUG_PLANNER_HEAD) && defined(MAX7219_DEBUG_PLANNER_TAIL) && MAX7219_DEBUG_PLANNER_HEAD == MAX7219_DEBUG_PLANNER_TAIL
+ static int16_t last_head_cnt = 0xF, last_tail_cnt = 0xF;
+
+ if (last_head_cnt != head || last_tail_cnt != tail) {
+ Max7219_Range16(MAX7219_DEBUG_PLANNER_HEAD, last_tail_cnt, tail, last_head_cnt, head);
+ last_head_cnt = head;
last_tail_cnt = tail;
- if (tail < 8)
- Max7219_LED_On(MAX7219_DEBUG_STEPPER_TAIL, tail);
- else
- Max7219_LED_On(MAX7219_DEBUG_STEPPER_TAIL + 1, tail - 8);
}
+
+ #else
+
+ #ifdef MAX7219_DEBUG_PLANNER_HEAD
+ static int16_t last_head_cnt = 0x1;
+ if (last_head_cnt != head) {
+ Max7219_Mark16(MAX7219_DEBUG_PLANNER_HEAD, last_head_cnt, head);
+ last_head_cnt = head;
+ }
+ #endif
+
+ #ifdef MAX7219_DEBUG_PLANNER_TAIL
+ static int16_t last_tail_cnt = 0x1;
+ if (last_tail_cnt != tail) {
+ Max7219_Mark16(MAX7219_DEBUG_PLANNER_TAIL, last_tail_cnt, tail);
+ last_tail_cnt = tail;
+ }
+ #endif
+
#endif
- #ifdef MAX7219_DEBUG_STEPPER_QUEUE
+ #ifdef MAX7219_DEBUG_PLANNER_QUEUE
static int16_t last_depth = 0;
- int16_t current_depth = head - tail;
- if (current_depth != last_depth) { // usually, no update will be needed.
- if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
- NOMORE(current_depth, BLOCK_BUFFER_SIZE);
- NOMORE(current_depth, 16); // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
- // of LEDs is enough to see if the buffer is draining
-
- const uint8_t st = min(current_depth, last_depth),
- en = max(current_depth, last_depth);
- if (current_depth < last_depth)
- for (uint8_t i = st; i <= en; i++) // clear the highest order LEDs
- Max7219_LED_Off(MAX7219_DEBUG_STEPPER_QUEUE + (i & 1), i / 2);
- else
- for (uint8_t i = st; i <= en; i++) // set the LEDs to current depth
- Max7219_LED_On(MAX7219_DEBUG_STEPPER_QUEUE + (i & 1), i / 2);
-
+ const int16_t current_depth = (head - tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1) & 0xF;
+ if (current_depth != last_depth) {
+ Max7219_Quantity16(MAX7219_DEBUG_PLANNER_QUEUE, last_depth, current_depth);
last_depth = current_depth;
}
#endif
diff --git a/Marlin/src/feature/Max7219_Debug_LEDs.h b/Marlin/src/feature/Max7219_Debug_LEDs.h
index 3beccb0ea8b8..e550a2906df4 100644
--- a/Marlin/src/feature/Max7219_Debug_LEDs.h
+++ b/Marlin/src/feature/Max7219_Debug_LEDs.h
@@ -22,11 +22,9 @@
/**
* This module is off by default, but can be enabled to facilitate the display of
- * extra debug information during code development. It assumes the existence of a
- * Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
- * http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
+ * extra debug information during code development.
*
- * Just connect up +5v and GND to give it power, then connect up the pins assigned
+ * Just connect up 5V and GND to give it power, then connect up the pins assigned
* in Configuration_adv.h. For example, on the Re-ARM you could use:
*
* #define MAX7219_CLK_PIN 77
@@ -36,27 +34,18 @@
* Max7219_init() is called automatically at startup, and then there are a number of
* support functions available to control the LEDs in the 8x8 grid.
*
- * void Max7219_init();
- * void Max7219_PutByte(uint8_t data);
- * void Max7219(uint8_t reg, uint8_t data);
- * void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
- * void Max7219_LED_On(uint8_t col, uint8_t row);
- * void Max7219_LED_Off(uint8_t col, uint8_t row);
- * void Max7219_LED_Toggle(uint8_t row, uint8_t col);
- * void Max7219_Clear_Row(uint8_t row);
- * void Max7219_Clear_Column(uint8_t col);
- * void Max7219_Set_Row(uint8_t row, uint8_t val);
- * void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
- * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
- * void Max7219_Set_Column(uint8_t col, uint8_t val);
- * void Max7219_idle_tasks();
+ * If you are using the Max7219 matrix for firmware debug purposes in time sensitive
+ * areas of the code, please be aware that the orientation (rotation) of the display can
+ * affect the speed. The Max7219 can update a single column fairly fast. It is much
+ * faster to do a Max7219_Set_Column() with a rotation of 90 or 270 degrees than to do
+ * a Max7219_Set_Row(). The opposite is true for rotations of 0 or 180 degrees.
*/
#ifndef __MAX7219_DEBUG_LEDS_H__
#define __MAX7219_DEBUG_LEDS_H__
//
-// define max7219 registers
+// MAX7219 registers
//
#define max7219_reg_noop 0x00
#define max7219_reg_digit0 0x01
@@ -68,23 +57,91 @@
#define max7219_reg_digit6 0x07
#define max7219_reg_digit7 0x08
-#define max7219_reg_intensity 0x0A
-#define max7219_reg_displayTest 0x0F
#define max7219_reg_decodeMode 0x09
+#define max7219_reg_intensity 0x0A
#define max7219_reg_scanLimit 0x0B
#define max7219_reg_shutdown 0x0C
+#define max7219_reg_displayTest 0x0F
void Max7219_init();
void Max7219_PutByte(uint8_t data);
+void Max7219_pulse_load();
+
+// Set a single register (e.g., a whole native row)
void Max7219(const uint8_t reg, const uint8_t data);
-void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
-void Max7219_LED_On(const uint8_t row, const uint8_t col);
-void Max7219_LED_Off(const uint8_t row, const uint8_t col);
-void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
-void Max7219_Clear_Row(const uint8_t row);
+
+// Set a single LED by XY coordinate
+void Max7219_LED_Set(const uint8_t x, const uint8_t y, const bool on);
+void Max7219_LED_On(const uint8_t x, const uint8_t y);
+void Max7219_LED_Off(const uint8_t x, const uint8_t y);
+void Max7219_LED_Toggle(const uint8_t x, const uint8_t y);
+
+// Set all LEDs in a single column
+void Max7219_Set_Column(const uint8_t col, const uint32_t val);
void Max7219_Clear_Column(const uint8_t col);
-void Max7219_Set_Row(const uint8_t row, const uint8_t val);
-void Max7219_Set_Column(const uint8_t col, const uint8_t val);
+
+// Set all LEDs in a single row
+void Max7219_Set_Row(const uint8_t row, const uint32_t val);
+void Max7219_Clear_Row(const uint8_t row);
+
+// 16 and 32 bit versions of Row and Column functions
+// Multiple rows and columns will be used to display the value if
+// the array of matrix LED's is too narrow to accomplish the goal
+void Max7219_Set_Rows_16bits(const uint8_t y, uint32_t val);
+void Max7219_Set_Rows_32bits(const uint8_t y, uint32_t val);
+void Max7219_Set_Columns_16bits(const uint8_t x, uint32_t val);
+void Max7219_Set_Columns_32bits(const uint8_t x, uint32_t val);
+
+// Quickly clear the whole matrix
+void Max7219_Clear();
+
+// Apply custom code to update the matrix
void Max7219_idle_tasks();
+#ifndef MAX7219_ROTATE
+ #define MAX7219_ROTATE 0
+#endif
+#define _ROT ((MAX7219_ROTATE + 360) % 360)
+#if _ROT == 0
+ #define MAX7219_UPDATE_AXIS y // Fast line update axis for this orientation of the matrix display
+ #define MAX7219_Y_LEDS 8
+ #define MAX7219_X_LEDS (MAX7219_Y_LEDS * (MAX7219_NUMBER_UNITS))
+ #define XOR_7219(x, y) LEDs[(x & 0xF8) + y] ^= _BV(7 - (x & 0x07))
+ #define SET_PIXEL_7219(x, y) LEDs[(x & 0xF8) + y] |= _BV(7 - (x & 0x07))
+ #define CLEAR_PIXEL_7219(x, y) LEDs[(x & 0xF8) + y] &= (_BV(7 - (x & 0x07)) ^ 0xFF)
+ #define BIT_7219(x, y) TEST(LEDs[(x & 0xF8) + y], 7 - (x & 0x07))
+ #define SEND_7219(R) do {for(int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit0 + (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); } while (0);
+#elif _ROT == 90
+ #define MAX7219_UPDATE_AXIS x // Fast line update axis for this orientation of the matrix display
+ #define MAX7219_X_LEDS 8
+ #define MAX7219_Y_LEDS (MAX7219_X_LEDS * (MAX7219_NUMBER_UNITS))
+ #define XOR_7219(x, y) LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)] ^= _BV((y & 0x7))
+ #define SET_PIXEL_7219(x, y) LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)] |= _BV((y & 0x7))
+ #define CLEAR_PIXEL_7219(x, y) LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)] &= (_BV((y & 0x7)) ^ 0xFF)
+ #define BIT_7219(x, y) TEST(LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)], (y & 0x7))
+ #define SEND_7219(R) do {for(int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit0 + (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); } while (0);
+#elif _ROT == 180
+ #define MAX7219_UPDATE_AXIS y // Fast line update axis for this orientation of the matrix display
+ #define MAX7219_Y_LEDS 8
+ #define MAX7219_X_LEDS (MAX7219_Y_LEDS * (MAX7219_NUMBER_UNITS))
+ #define XOR_7219(x, y) LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8] ^= _BV((x & 0x07))
+ #define SET_PIXEL_7219(x, y) LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8] |= _BV((x & 0x07))
+ #define CLEAR_PIXEL_7219(x, y) LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8] &= (_BV((x & 0x07)) ^ 0xFF)
+ #define BIT_7219(x, y) TEST(LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8], ((x & 0x07)))
+ #define SEND_7219(R) do {for(int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit7 - (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); } while (0);
+#elif _ROT == 270
+ #define MAX7219_UPDATE_AXIS x // Fast line update axis for this orientation of the matrix display
+ #define MAX7219_X_LEDS 8
+ #define MAX7219_Y_LEDS (MAX7219_X_LEDS * (MAX7219_NUMBER_UNITS))
+ #define XOR_7219(x, y) LEDs[x + (y & 0xF8)] ^= _BV(7 - (y & 0x7))
+ #define SET_PIXEL_7219(x, y) LEDs[x + (y & 0xF8)] |= _BV(7 - (y & 0x7))
+ #define CLEAR_PIXEL_7219(x, y) LEDs[x + (y & 0xF8)] &= (_BV(7 - (y & 0x7)) ^ 0xFF)
+ #define BIT_7219(x, y) TEST(LEDs[x + (y & 0xF8)], 7 - (y & 0x7))
+ #define SEND_7219(R) do {for(int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit7 - (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); } while (0);
+#else
+ #error "MAX7219_ROTATE must be a multiple of +/- 90°."
+#endif
+
+extern uint8_t LEDs[8*MAX7219_NUMBER_UNITS];
+
#endif // __MAX7219_DEBUG_LEDS_H__
diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp
index 6362608622f0..4b7658f8d32b 100644
--- a/Marlin/src/feature/bedlevel/abl/abl.cpp
+++ b/Marlin/src/feature/bedlevel/abl/abl.cpp
@@ -295,7 +295,7 @@ float bilinear_z_offset(const float raw[XYZ]) {
#endif
gridx = gx;
- nextx = min(gridx + 1, ABL_BG_POINTS_X - 1);
+ nextx = MIN(gridx + 1, ABL_BG_POINTS_X - 1);
}
if (last_y != ry || last_gridx != gridx) {
@@ -312,7 +312,7 @@ float bilinear_z_offset(const float raw[XYZ]) {
#endif
gridy = gy;
- nexty = min(gridy + 1, ABL_BG_POINTS_Y - 1);
+ nexty = MIN(gridy + 1, ABL_BG_POINTS_Y - 1);
}
if (last_gridx != gridx || last_gridy != gridy) {
@@ -336,7 +336,7 @@ float bilinear_z_offset(const float raw[XYZ]) {
/*
static float last_offset = 0;
- if (FABS(last_offset - offset) > 0.2) {
+ if (ABS(last_offset - offset) > 0.2) {
SERIAL_ECHOPGM("Sudden Shift at ");
SERIAL_ECHOPAIR("x=", rx);
SERIAL_ECHOPAIR(" / ", bilinear_grid_spacing[X_AXIS]);
@@ -362,7 +362,7 @@ float bilinear_z_offset(const float raw[XYZ]) {
#if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)
- #define CELL_INDEX(A,V) ((V - bilinear_start[A##_AXIS]) * ABL_BG_FACTOR(A##_AXIS))
+ #define CELL_INDEX(A,V) ((V - bilinear_start[_AXIS(A)]) * ABL_BG_FACTOR(_AXIS(A)))
/**
* Prepare a bilinear-leveled linear move on Cartesian,
@@ -386,10 +386,10 @@ float bilinear_z_offset(const float raw[XYZ]) {
return;
}
- #define LINE_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist)
+ #define LINE_SEGMENT_END(A) (current_position[_AXIS(A)] + (destination[_AXIS(A)] - current_position[_AXIS(A)]) * normalized_dist)
float normalized_dist, end[XYZE];
- const int8_t gcx = max(cx1, cx2), gcy = max(cy1, cy2);
+ const int8_t gcx = MAX(cx1, cx2), gcy = MAX(cy1, cy2);
// Crosses on the X and not already split on this X?
// The x_splits flags are insurance against rounding errors.
diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp
index ea1284efc003..99887d361d9e 100644
--- a/Marlin/src/feature/bedlevel/bedlevel.cpp
+++ b/Marlin/src/feature/bedlevel/bedlevel.cpp
@@ -53,7 +53,7 @@ bool leveling_is_valid() {
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
!!bilinear_grid_spacing[X_AXIS]
#elif ENABLED(AUTO_BED_LEVELING_UBL)
- true
+ ubl.mesh_is_valid()
#else // 3POINT, LINEAR
true
#endif
@@ -99,7 +99,21 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
planner.unapply_leveling(current_position);
}
#else
- planner.leveling_active = enable; // just flip the bit, current_position will be wrong until next move.
+ // UBL equivalents for apply/unapply_leveling
+ #if ENABLED(SKEW_CORRECTION)
+ float pos[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
+ planner.skew(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]);
+ #else
+ const float (&pos)[XYZE] = current_position;
+ #endif
+ if (planner.leveling_active) {
+ current_position[Z_AXIS] += ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]);
+ planner.leveling_active = false;
+ }
+ else {
+ planner.leveling_active = true;
+ current_position[Z_AXIS] -= ubl.get_z_correction(pos[X_AXIS], pos[Y_AXIS]);
+ }
#endif
#else // OLDSCHOOL_ABL
@@ -252,7 +266,14 @@ void reset_bed_level() {
void _manual_goto_xy(const float &rx, const float &ry) {
- #if MANUAL_PROBE_HEIGHT > 0
+ #ifdef MANUAL_PROBE_START_Z
+ #if MANUAL_PROBE_HEIGHT > 0
+ do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
+ do_blocking_move_to_z(MAX(0,MANUAL_PROBE_START_Z));
+ #else
+ do_blocking_move_to(rx, ry, MAX(0,MANUAL_PROBE_START_Z));
+ #endif
+ #elif MANUAL_PROBE_HEIGHT > 0
const float prev_z = current_position[Z_AXIS];
do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
do_blocking_move_to_z(prev_z);
diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
index 800630c6ba28..36812b6355c8 100644
--- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
+++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
@@ -73,10 +73,10 @@
return;
}
- #define MBL_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist)
+ #define MBL_SEGMENT_END(A) (current_position[_AXIS(A)] + (destination[_AXIS(A)] - current_position[_AXIS(A)]) * normalized_dist)
float normalized_dist, end[XYZE];
- const int8_t gcx = max(cx1, cx2), gcy = max(cy1, cy2);
+ const int8_t gcx = MAX(cx1, cx2), gcy = MAX(cy1, cy2);
// Crosses on the X and not already split on this X?
// The x_splits flags are insurance against rounding errors.
diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
index 7f2d5c0aa10e..5b68edefe55c 100644
--- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
+++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
@@ -72,22 +72,22 @@ class mesh_bed_leveling {
}
static int8_t cell_index_x(const float &x) {
- int8_t cx = (x - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
+ int8_t cx = (x - (MESH_MIN_X)) * (1.0f / (MESH_X_DIST));
return constrain(cx, 0, (GRID_MAX_POINTS_X) - 2);
}
static int8_t cell_index_y(const float &y) {
- int8_t cy = (y - (MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
+ int8_t cy = (y - (MESH_MIN_Y)) * (1.0f / (MESH_Y_DIST));
return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 2);
}
static int8_t probe_index_x(const float &x) {
- int8_t px = (x - (MESH_MIN_X) + 0.5 * (MESH_X_DIST)) * (1.0 / (MESH_X_DIST));
+ int8_t px = (x - (MESH_MIN_X) + 0.5f * (MESH_X_DIST)) * (1.0f / (MESH_X_DIST));
return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
}
static int8_t probe_index_y(const float &y) {
- int8_t py = (y - (MESH_MIN_Y) + 0.5 * (MESH_Y_DIST)) * (1.0 / (MESH_Y_DIST));
+ int8_t py = (y - (MESH_MIN_Y) + 0.5f * (MESH_Y_DIST)) * (1.0f / (MESH_Y_DIST));
return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
}
@@ -114,9 +114,8 @@ class mesh_bed_leveling {
;
}
- // Support functions, which may be embedded in the class later
#if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)
- void line_to_destination(const float fr_mm_s, uint8_t x_splits=0xFF, uint8_t y_splits=0xFF);
+ static void line_to_destination(const float fr_mm_s, uint8_t x_splits=0xFF, uint8_t y_splits=0xFF);
#endif
};
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp
index 2ddca1a86b37..143d7a0fcc79 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp
@@ -51,7 +51,7 @@
) {
if (!leveling_is_valid()) return;
SERIAL_ECHO_START_P(port);
- SERIAL_ECHOLNPGM_P(port, " G29 I 999");
+ SERIAL_ECHOLNPGM_P(port, " G29 I99");
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(z_values[x][y])) {
@@ -59,9 +59,7 @@
SERIAL_ECHOPAIR_P(port, " M421 I", x);
SERIAL_ECHOPAIR_P(port, " J", y);
SERIAL_ECHOPGM_P(port, " Z");
- SERIAL_ECHO_F_P(port, z_values[x][y], 6);
- SERIAL_ECHOPAIR_P(port, " ; X", LOGICAL_X_POSITION(mesh_index_to_xpos(x)));
- SERIAL_ECHOPAIR_P(port, ", Y", LOGICAL_Y_POSITION(mesh_index_to_ypos(y)));
+ SERIAL_ECHO_F_P(port, z_values[x][y], 2);
SERIAL_EOL_P(port);
safe_delay(75); // Prevent Printrun from exploding
}
@@ -83,15 +81,6 @@
safe_delay(50);
}
- static void serial_echo_xy(const int16_t x, const int16_t y) {
- SERIAL_CHAR('(');
- SERIAL_ECHO(x);
- SERIAL_CHAR(',');
- SERIAL_ECHO(y);
- SERIAL_CHAR(')');
- safe_delay(10);
- }
-
#if ENABLED(UBL_DEVEL_DEBUGGING)
static void debug_echo_axis(const AxisEnum axis) {
@@ -189,78 +178,109 @@
}
}
- // display_map() currently produces three different mesh map types
- // 0 : suitable for PronterFace and Repetier's serial console
- // 1 : .CSV file suitable for importation into various spread sheets
- // 2 : disply of the map data on a RepRap Graphical LCD Panel
+ static void serial_echo_xy(const uint8_t sp, const int16_t x, const int16_t y) {
+ SERIAL_ECHO_SP(sp);
+ SERIAL_CHAR('(');
+ if (x < 100) { SERIAL_CHAR(' '); if (x < 10) SERIAL_CHAR(' '); }
+ SERIAL_ECHO(x);
+ SERIAL_CHAR(',');
+ if (y < 100) { SERIAL_CHAR(' '); if (y < 10) SERIAL_CHAR(' '); }
+ SERIAL_ECHO(y);
+ SERIAL_CHAR(')');
+ safe_delay(5);
+ }
+
+ static void serial_echo_column_labels(const uint8_t sp) {
+ SERIAL_ECHO_SP(7);
+ for (int8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
+ if (i < 10) SERIAL_CHAR(' ');
+ SERIAL_ECHO(i);
+ SERIAL_ECHO_SP(sp);
+ }
+ safe_delay(10);
+ }
+ /**
+ * Produce one of these mesh maps:
+ * 0: Human-readable
+ * 1: CSV format for spreadsheet import
+ * 2: TODO: Display on Graphical LCD
+ * 4: Compact Human-Readable
+ */
void unified_bed_leveling::display_map(const int map_type) {
#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
suspend_auto_report = true;
#endif
- constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2);
+ constexpr uint8_t eachsp = 1 + 6 + 1, // [-3.567]
+ twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each
- SERIAL_PROTOCOLPGM("\nBed Topography Report");
- if (map_type == 0) {
- SERIAL_PROTOCOLPGM(":\n\n");
- serial_echo_xy(0, GRID_MAX_POINTS_Y - 1);
- SERIAL_ECHO_SP(spaces + 3);
- serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
- SERIAL_EOL();
- serial_echo_xy(MESH_MIN_X, MESH_MAX_Y);
- SERIAL_ECHO_SP(spaces);
- serial_echo_xy(MESH_MAX_X, MESH_MAX_Y);
+ const bool human = !(map_type & 0x3), csv = map_type == 1, lcd = map_type == 2, comp = map_type & 0x4;
+
+ SERIAL_ECHOPGM("\nBed Topography Report");
+ if (human) {
+ SERIAL_ECHOPGM(":\n\n");
+ serial_echo_xy(4, MESH_MIN_X, MESH_MAX_Y);
+ serial_echo_xy(twixt, MESH_MAX_X, MESH_MAX_Y);
SERIAL_EOL();
+ serial_echo_column_labels(eachsp - 2);
}
else {
- SERIAL_PROTOCOLPGM(" for ");
- serialprintPGM(map_type == 1 ? PSTR("CSV:\n\n") : PSTR("LCD:\n\n"));
+ SERIAL_ECHOPGM(" for ");
+ serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n"));
}
const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
+ if (!lcd) SERIAL_EOL();
for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {
+
+ // Row Label (J index)
+ if (human) {
+ if (j < 10) SERIAL_CHAR(' ');
+ SERIAL_ECHO(j);
+ SERIAL_ECHOPGM(" |");
+ }
+
+ // Row Values (I indexes)
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
- const bool is_current = i == current_xi && j == current_yi;
- // is the nozzle here? then mark the number
- if (map_type == 0) SERIAL_CHAR(is_current ? '[' : ' ');
+ // Opening Brace or Space
+ const bool is_current = i == current_xi && j == current_yi;
+ if (human) SERIAL_CHAR(is_current ? '[' : ' ');
+ // Z Value at current I, J
const float f = z_values[i][j];
- if (isnan(f)) {
- serialprintPGM(map_type == 0 ? PSTR(" . ") : PSTR("NAN"));
+ if (lcd) {
+ // TODO: Display on Graphical LCD
}
- else if (map_type <= 1) {
- // if we don't do this, the columns won't line up nicely
- if (map_type == 0 && f >= 0.0) SERIAL_CHAR(' ');
- SERIAL_PROTOCOL_F(f, 3);
+ else if (isnan(f))
+ serialprintPGM(human ? PSTR(" . ") : PSTR("NAN"));
+ else if (human || csv) {
+ if (human && f >= 0.0) SERIAL_CHAR(f > 0 ? '+' : ' '); // Space for positive ('-' for negative)
+ SERIAL_ECHO_F(f, 3); // Positive: 5 digits, Negative: 6 digits
}
- idle();
- if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(',');
+ if (csv && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR('\t');
+
+ // Closing Brace or Space
+ if (human) SERIAL_CHAR(is_current ? ']' : ' ');
+
SERIAL_FLUSHTX();
- safe_delay(15);
- if (map_type == 0) {
- SERIAL_CHAR(is_current ? ']' : ' ');
- SERIAL_CHAR(' ');
- }
- }
- SERIAL_EOL();
- if (j && map_type == 0) { // we want the (0,0) up tight against the block of numbers
- SERIAL_CHAR(' ');
- SERIAL_EOL();
+ idle();
}
+ if (!lcd) SERIAL_EOL();
+
+ // A blank line between rows (unless compact)
+ if (j && human && !comp) SERIAL_ECHOLNPGM(" |");
}
- if (map_type == 0) {
- serial_echo_xy(MESH_MIN_X, MESH_MIN_Y);
- SERIAL_ECHO_SP(spaces + 4);
- serial_echo_xy(MESH_MAX_X, MESH_MIN_Y);
+ if (human) {
+ serial_echo_column_labels(eachsp - 2);
+ SERIAL_EOL();
+ serial_echo_xy(4, MESH_MIN_X, MESH_MIN_Y);
+ serial_echo_xy(twixt, MESH_MAX_X, MESH_MIN_Y);
SERIAL_EOL();
- serial_echo_xy(0, 0);
- SERIAL_ECHO_SP(spaces + 5);
- serial_echo_xy(GRID_MAX_POINTS_X - 1, 0);
SERIAL_EOL();
}
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h
index 9de087c3bf54..cbd5ed4bf6bb 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl.h
+++ b/Marlin/src/feature/bedlevel/ubl/ubl.h
@@ -56,7 +56,6 @@ extern uint8_t ubl_cnt;
///////////////////////////////////////////////////////////////////////////////////////////////////////
#if ENABLED(ULTRA_LCD)
- extern char lcd_status_message[];
void lcd_quick_feedback(const bool clear_buttons);
#endif
@@ -89,7 +88,6 @@ class unified_bed_leveling {
#endif
static bool g29_parameter_parsing() _O0;
- static void find_mean_mesh_height();
static void shift_mesh_height();
static void probe_entire_mesh(const float &rx, const float &ry, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) _O0;
static void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3);
@@ -124,7 +122,8 @@ class unified_bed_leveling {
static mesh_index_pair find_furthest_invalid_mesh_point() _O0;
static void reset();
static void invalidate();
- static void set_all_mesh_points_to_value(const float);
+ static void set_all_mesh_points_to_value(const float value);
+ static void adjust_mesh_to_mean(const bool cflag, const float value);
static bool sanity_check();
static void G29() _O0; // O0 for no optimization
@@ -169,14 +168,14 @@ class unified_bed_leveling {
FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
static int8_t get_cell_index_x(const float &x) {
- const int8_t cx = (x - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
+ const int8_t cx = (x - (MESH_MIN_X)) * (1.0f / (MESH_X_DIST));
return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1); // -1 is appropriate if we want all movement to the X_MAX
} // position. But with this defined this way, it is possible
// to extrapolate off of this point even further out. Probably
// that is OK because something else should be keeping that from
// happening and should not be worried about at this level.
static int8_t get_cell_index_y(const float &y) {
- const int8_t cy = (y - (MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
+ const int8_t cy = (y - (MESH_MIN_Y)) * (1.0f / (MESH_Y_DIST));
return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1); // -1 is appropriate if we want all movement to the Y_MAX
} // position. But with this defined this way, it is possible
// to extrapolate off of this point even further out. Probably
@@ -184,12 +183,12 @@ class unified_bed_leveling {
// happening and should not be worried about at this level.
static int8_t find_closest_x_index(const float &x) {
- const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
+ const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0f / (MESH_X_DIST));
return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
}
static int8_t find_closest_y_index(const float &y) {
- const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST));
+ const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0f / (MESH_Y_DIST));
return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
}
@@ -239,10 +238,10 @@ class unified_bed_leveling {
);
}
- const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * (1.0 / (MESH_X_DIST)),
+ const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * (1.0f / (MESH_X_DIST)),
z1 = z_values[x1_i][yi];
- return z1 + xratio * (z_values[min(x1_i, GRID_MAX_POINTS_X - 2) + 1][yi] - z1); // Don't allow x1_i+1 to be past the end of the array
+ return z1 + xratio * (z_values[MIN(x1_i, GRID_MAX_POINTS_X - 2) + 1][yi] - z1); // Don't allow x1_i+1 to be past the end of the array
// If it is, it is clamped to the last element of the
// z_values[][] array and no correction is applied.
}
@@ -273,10 +272,10 @@ class unified_bed_leveling {
);
}
- const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * (1.0 / (MESH_Y_DIST)),
+ const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * (1.0f / (MESH_Y_DIST)),
z1 = z_values[xi][y1_i];
- return z1 + yratio * (z_values[xi][min(y1_i, GRID_MAX_POINTS_Y - 2) + 1] - z1); // Don't allow y1_i+1 to be past the end of the array
+ return z1 + yratio * (z_values[xi][MIN(y1_i, GRID_MAX_POINTS_Y - 2) + 1] - z1); // Don't allow y1_i+1 to be past the end of the array
// If it is, it is clamped to the last element of the
// z_values[][] array and no correction is applied.
}
@@ -302,11 +301,11 @@ class unified_bed_leveling {
const float z1 = calc_z0(rx0,
mesh_index_to_xpos(cx), z_values[cx][cy],
- mesh_index_to_xpos(cx + 1), z_values[min(cx, GRID_MAX_POINTS_X - 2) + 1][cy]);
+ mesh_index_to_xpos(cx + 1), z_values[MIN(cx, GRID_MAX_POINTS_X - 2) + 1][cy]);
const float z2 = calc_z0(rx0,
- mesh_index_to_xpos(cx), z_values[cx][min(cy, GRID_MAX_POINTS_Y - 2) + 1],
- mesh_index_to_xpos(cx + 1), z_values[min(cx, GRID_MAX_POINTS_X - 2) + 1][min(cy, GRID_MAX_POINTS_Y - 2) + 1]);
+ mesh_index_to_xpos(cx), z_values[cx][MIN(cy, GRID_MAX_POINTS_Y - 2) + 1],
+ mesh_index_to_xpos(cx + 1), z_values[MIN(cx, GRID_MAX_POINTS_X - 2) + 1][MIN(cy, GRID_MAX_POINTS_Y - 2) + 1]);
float z0 = calc_z0(ry0,
mesh_index_to_ypos(cy), z1,
@@ -363,17 +362,11 @@ class unified_bed_leveling {
static void line_to_destination_cartesian(const float &fr, const uint8_t e);
#endif
- #define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1])
- #define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1))
- #define ZZER(a) (z_values[a][0] == 0)
-
- FORCE_INLINE bool mesh_is_valid() {
- return !(
- ( CMPZ(0) && CMPZ(1) && CMPZ(2) // adjacent z values all equal?
- && ZZER(0) && ZZER(1) && ZZER(2) // all zero at the edge?
- )
- || isnan(z_values[0][0])
- );
+ inline static bool mesh_is_valid() {
+ for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
+ for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
+ if (isnan(z_values[x][y])) return false;
+ return true;
}
}; // class unified_bed_leveling
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
index ceefbb1569b3..654b4c193c22 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
@@ -41,7 +41,9 @@
#include "../../../feature/bedlevel/bedlevel.h"
#include "../../../libs/least_squares_fit.h"
-#include "../../../feature/Max7219_Debug_LEDs.h"
+ #if ENABLED(DUAL_X_CARRIAGE)
+ #include "../../../module/tool_change.h"
+ #endif
#include
@@ -54,9 +56,6 @@
void _lcd_ubl_output_map_lcd();
#endif
- extern float meshedit_done;
- extern long babysteps_done;
-
#define SIZE_OF_LITTLE_RAISE 1
#define BIG_RAISE_NOT_NEEDED 0
@@ -70,8 +69,8 @@
unified_bed_leveling::g29_y_flag;
float unified_bed_leveling::g29_x_pos,
unified_bed_leveling::g29_y_pos,
- unified_bed_leveling::g29_card_thickness = 0.0,
- unified_bed_leveling::g29_constant = 0.0;
+ unified_bed_leveling::g29_card_thickness = 0,
+ unified_bed_leveling::g29_constant = 0;
#if HAS_BED_PROBE
int unified_bed_leveling::g29_grid_size;
@@ -210,8 +209,8 @@
* adhesion.
*
* P4 moves to the closest Mesh Point (and/or the given X Y), raises the nozzle above the mesh height
- * by the given 'H' offset (or default Z_CLEARANCE_BETWEEN_PROBES), and waits while the controller is
- * used to adjust the nozzle height. On click the displayed height is saved in the mesh.
+ * by the given 'H' offset (or default 0), and waits while the controller is used to adjust the nozzle
+ * height. On click the displayed height is saved in the mesh.
*
* Start Phase 4 at a specific location with X and Y. Adjust a specific number of Mesh Points with
* the 'R' (Repeat) parameter. (If 'R' is left out, the whole matrix is assumed.) This command can be
@@ -252,9 +251,7 @@
* for subsequent Load and Store operations. Valid storage slot numbers begin at 0 and
* extend to a limit related to the available EEPROM storage.
*
- * S -1 Store Store the current Mesh as a print out that is suitable to be feed back into the system
- * at a later date. The GCode output can be saved and later replayed by the host software
- * to reconstruct the current mesh on another machine.
+ * S -1 Store Print the current Mesh as G-code that can be used to restore the mesh anytime.
*
* T Topology Display the Mesh Map Topology.
* 'T' can be used alone (e.g., G29 T) or in combination with most of the other commands.
@@ -299,13 +296,17 @@
void unified_bed_leveling::G29() {
- if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
+ if (g29_parameter_parsing()) return; // Abort on parameter error
+
+ const int8_t p_val = parser.intval('P', -1);
+ const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J');
// Check for commands that require the printer to be homed
- if (axis_unhomed_error()) {
- const int8_t p_val = parser.intval('P', -1);
- if (p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'))
- gcode.home_all_axes();
+ if (may_move) {
+ #if ENABLED(DUAL_X_CARRIAGE)
+ if (active_extruder != 0) tool_change(0);
+ #endif
+ if (axis_unhomed_error()) gcode.home_all_axes();
}
// Invalidate Mesh Points. This command is a little bit asymmetrical because
@@ -349,23 +350,23 @@
case 0:
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) { // Create a bowl shape - similar to
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) { // a poorly calibrated Delta.
- const float p1 = 0.5 * (GRID_MAX_POINTS_X) - x,
- p2 = 0.5 * (GRID_MAX_POINTS_Y) - y;
- z_values[x][y] += 2.0 * HYPOT(p1, p2);
+ const float p1 = 0.5f * (GRID_MAX_POINTS_X) - x,
+ p2 = 0.5f * (GRID_MAX_POINTS_Y) - y;
+ z_values[x][y] += 2.0f * HYPOT(p1, p2);
}
}
break;
case 1:
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) { // Create a diagonal line several Mesh cells thick that is raised
- z_values[x][x] += 9.999;
- z_values[x][x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1] += 9.999; // We want the altered line several mesh points thick
+ z_values[x][x] += 9.999f;
+ z_values[x][x + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1] += 9.999f; // We want the altered line several mesh points thick
}
break;
case 2:
// Allow the user to specify the height because 10mm is a little extreme in some cases.
for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++) // Create a rectangular raised area in
for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) // the center of the bed
- z_values[x][y] += parser.seen('C') ? g29_constant : 9.99;
+ z_values[x][y] += parser.seen('C') ? g29_constant : 9.99f;
break;
}
}
@@ -384,7 +385,7 @@
tilt_mesh_based_on_probed_grid(true /* true says to do 3-Point leveling */ );
restore_ubl_active_state_and_leave();
}
- do_blocking_move_to_xy(0.5 * (MESH_MAX_X - (MESH_MIN_X)), 0.5 * (MESH_MAX_Y - (MESH_MIN_Y)));
+ do_blocking_move_to_xy(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)));
report_current_position();
}
@@ -456,7 +457,7 @@
if (parser.seen('B')) {
g29_card_thickness = parser.has_value() ? parser.value_float() : measure_business_card_thickness((float) Z_CLEARANCE_BETWEEN_PROBES);
- if (FABS(g29_card_thickness) > 1.5) {
+ if (ABS(g29_card_thickness) > 1.5f) {
SERIAL_PROTOCOLLNPGM("?Error in Business Card measurement.");
return;
}
@@ -512,7 +513,7 @@
}
else {
const float cvf = parser.value_float();
- switch ((int)truncf(cvf * 10.0) - 30) { // 3.1 -> 1
+ switch ((int)truncf(cvf * 10.0f) - 30) { // 3.1 -> 1
#if ENABLED(UBL_G29_P31)
case 1: {
@@ -522,8 +523,8 @@
// P3.12 100X distance weighting
// P3.13 1000X distance weighting, approaches simple average of nearest points
- const float weight_power = (cvf - 3.10) * 100.0, // 3.12345 -> 2.345
- weight_factor = weight_power ? POW(10.0, weight_power) : 0;
+ const float weight_power = (cvf - 3.10f) * 100.0f, // 3.12345 -> 2.345
+ weight_factor = weight_power ? POW(10.0f, weight_power) : 0;
smart_fill_wlsf(weight_factor);
}
break;
@@ -546,7 +547,7 @@
#endif
break;
- case 5: find_mean_mesh_height(); break;
+ case 5: adjust_mesh_to_mean(g29_c_flag, g29_constant); break;
case 6: shift_mesh_height(); break;
}
@@ -628,16 +629,16 @@
#if ENABLED(NEWPANEL)
lcd_reset_alert_level();
- LCD_MESSAGEPGM("");
lcd_quick_feedback(true);
+ lcd_reset_status();
lcd_external_control = false;
#endif
return;
}
- void unified_bed_leveling::find_mean_mesh_height() {
- float sum = 0.0;
+ void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const float value) {
+ float sum = 0;
int n = 0;
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
@@ -651,7 +652,7 @@
//
// Sum the squares of difference from mean
//
- float sum_of_diff_squared = 0.0;
+ float sum_of_diff_squared = 0;
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(z_values[x][y]))
@@ -667,11 +668,11 @@
SERIAL_ECHO_F(sigma, 6);
SERIAL_EOL();
- if (g29_c_flag)
+ if (cflag)
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(z_values[x][y]))
- z_values[x][y] -= mean + g29_constant;
+ z_values[x][y] -= mean + value;
}
void unified_bed_leveling::shift_mesh_height() {
@@ -758,7 +759,7 @@
STOW_PROBE();
- #if Z_AFTER_PROBING
+ #ifdef Z_AFTER_PROBING
move_z_after_probing();
#endif
@@ -789,7 +790,7 @@
float unified_bed_leveling::measure_point_with_encoder() {
KEEPALIVE_STATE(PAUSED_FOR_USER);
- move_z_with_encoder(0.01);
+ move_z_with_encoder(0.01f);
KEEPALIVE_STATE(IN_HANDLER);
return current_position[Z_AXIS];
}
@@ -800,9 +801,9 @@
lcd_external_control = true;
save_ubl_active_state_and_disable(); // Disable bed level correction for probing
- do_blocking_move_to(0.5 * (MESH_MAX_X - (MESH_MIN_X)), 0.5 * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
- //, min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]) / 2.0);
- stepper.synchronize();
+ do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
+ //, MIN(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]) * 0.5f);
+ planner.synchronize();
SERIAL_PROTOCOLPGM("Place shim under nozzle");
LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
@@ -811,7 +812,7 @@
const float z1 = measure_point_with_encoder();
do_blocking_move_to_z(current_position[Z_AXIS] + SIZE_OF_LITTLE_RAISE);
- stepper.synchronize();
+ planner.synchronize();
SERIAL_PROTOCOLPGM("Remove shim");
LCD_MESSAGEPGM(MSG_UBL_BC_REMOVE);
@@ -821,7 +822,7 @@
do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES);
- const float thickness = abs(z1 - z2);
+ const float thickness = ABS(z1 - z2);
if (g29_verbose_level > 1) {
SERIAL_PROTOCOLPGM("Business Card is ");
@@ -877,8 +878,8 @@
serialprintPGM(parser.seen('B') ? PSTR(MSG_UBL_BC_INSERT) : PSTR(MSG_UBL_BC_INSERT2));
- const float z_step = 0.01; // existing behavior: 0.01mm per click, occasionally step
- //const float z_step = 1.0 / planner.axis_steps_per_mm[Z_AXIS]; // approx one step each click
+ const float z_step = 0.01f; // existing behavior: 0.01mm per click, occasionally step
+ //const float z_step = planner.steps_to_mm[Z_AXIS]; // approx one step each click
move_z_with_encoder(z_step);
@@ -916,7 +917,7 @@
lcd_quick_feedback(true);
#endif
- g29_constant = 0.0;
+ g29_constant = 0;
g29_repetition_cnt = 0;
g29_x_flag = parser.seenval('X');
@@ -1007,7 +1008,7 @@
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (parser.seenval('F')) {
const float fh = parser.value_float();
- if (!WITHIN(fh, 0.0, 100.0)) {
+ if (!WITHIN(fh, 0, 100)) {
SERIAL_PROTOCOLLNPGM("?(F)ade height for Bed Level Correction not plausible.\n");
return UBL_ERR;
}
@@ -1083,7 +1084,7 @@
SERIAL_EOL();
#endif
- find_mean_mesh_height();
+ adjust_mesh_to_mean(g29_c_flag, g29_constant);
#if HAS_BED_PROBE
SERIAL_PROTOCOLPGM("zprobe_zoffset: ");
@@ -1229,7 +1230,7 @@
mesh_index_pair out_mesh;
out_mesh.x_index = out_mesh.y_index = -1;
- out_mesh.distance = -99999.99;
+ out_mesh.distance = -99999.99f;
for (int8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (int8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
@@ -1245,7 +1246,7 @@
found_a_NAN = true;
int8_t closest_x = -1, closest_y = -1;
- float d1, d2 = 99999.9;
+ float d1, d2 = 99999.9f;
for (int8_t k = 0; k < GRID_MAX_POINTS_X; k++) {
for (int8_t l = 0; l < GRID_MAX_POINTS_Y; l++) {
if (!isnan(z_values[k][l])) {
@@ -1255,7 +1256,7 @@
// last half of the mesh (when every unprobed mesh point is one index
// from a probed location).
- d1 = HYPOT(i - k, j - l) + (1.0 / ((millis() % 47) + 13));
+ d1 = HYPOT(i - k, j - l) + (1.0f / ((millis() % 47) + 13));
if (d1 < d2) { // found a closer distance from invalid mesh point at (i,j) to defined mesh point at (k,l)
d2 = d1; // found a closer location with
@@ -1282,7 +1283,7 @@
if (!found_a_real && found_a_NAN) { // if the mesh is totally unpopulated, start the probing
out_mesh.x_index = GRID_MAX_POINTS_X / 2;
out_mesh.y_index = GRID_MAX_POINTS_Y / 2;
- out_mesh.distance = 1.0;
+ out_mesh.distance = 1;
}
return out_mesh;
}
@@ -1290,13 +1291,13 @@
mesh_index_pair unified_bed_leveling::find_closest_mesh_point_of_type(const MeshPointType type, const float &rx, const float &ry, const bool probe_as_reference, uint16_t bits[16]) {
mesh_index_pair out_mesh;
out_mesh.x_index = out_mesh.y_index = -1;
- out_mesh.distance = -99999.9;
+ out_mesh.distance = -99999.9f;
// Get our reference position. Either the nozzle or probe location.
const float px = rx - (probe_as_reference == USE_PROBE_AS_REFERENCE ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
py = ry - (probe_as_reference == USE_PROBE_AS_REFERENCE ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
- float best_so_far = 99999.99;
+ float best_so_far = 99999.99f;
for (int8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (int8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
@@ -1323,7 +1324,7 @@
// factor in the distance from the current location for the normal case
// so the nozzle isn't running all over the bed.
- distance += HYPOT(current_position[X_AXIS] - mx, current_position[Y_AXIS] - my) * 0.1;
+ distance += HYPOT(current_position[X_AXIS] - mx, current_position[Y_AXIS] - my) * 0.1f;
if (distance < best_so_far) {
best_so_far = distance; // We found a closer location with
out_mesh.x_index = i; // the specified type of mesh value.
@@ -1351,9 +1352,8 @@
g29_repetition_cnt = 1; // do exactly one mesh location. Otherwise use what the parser decided.
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
- const bool is_offset = parser.seen('H');
- const float h_offset = is_offset ? parser.value_linear_units() : Z_CLEARANCE_BETWEEN_PROBES;
- if (is_offset && !WITHIN(h_offset, 0, 10)) {
+ const float h_offset = parser.seenval('H') ? parser.value_linear_units() : 0;
+ if (!WITHIN(h_offset, 0, 10)) {
SERIAL_PROTOCOLLNPGM("Offset out of bounds. (0 to 10mm)\n");
return;
}
@@ -1369,63 +1369,63 @@
save_ubl_active_state_and_disable();
LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
+ lcd_external_control = true; // Take over control of the LCD encoder
- do_blocking_move_to(rx, ry, Z_CLEARANCE_BETWEEN_PROBES);
+ do_blocking_move_to(rx, ry, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
+
+ #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
+ do_blocking_move_to_z(h_offset); // Move Z to the given 'H' offset
+ #endif
uint16_t not_done[16];
memset(not_done, 0xFF, sizeof(not_done));
do {
location = find_closest_mesh_point_of_type(SET_IN_BITMAP, rx, ry, USE_NOZZLE_AS_REFERENCE, not_done);
- if (location.x_index < 0) break; // stop when we can't find any more reachable points.
+ if (location.x_index < 0) break; // Stop when there are no more reachable points
- bitmap_clear(not_done, location.x_index, location.y_index); // Mark this location as 'adjusted' so we will find a
- // different location the next time through the loop
+ bitmap_clear(not_done, location.x_index, location.y_index); // Mark this location as 'adjusted' so a new
+ // location is used on the next loop
const float rawx = mesh_index_to_xpos(location.x_index),
rawy = mesh_index_to_ypos(location.y_index);
- if (!position_is_reachable(rawx, rawy)) // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable
- break;
+ if (!position_is_reachable(rawx, rawy)) break; // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable
- do_blocking_move_to(rawx, rawy, Z_CLEARANCE_BETWEEN_PROBES); // Move the nozzle to the edit point
+ do_blocking_move_to(rawx, rawy, Z_CLEARANCE_BETWEEN_PROBES); // Move the nozzle to the edit point with probe clearance
+
+ #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
+ do_blocking_move_to_z(h_offset); // Move Z to the given 'H' offset before editing
+ #endif
KEEPALIVE_STATE(PAUSED_FOR_USER);
- lcd_external_control = true;
- if (do_ubl_mesh_map) display_map(g29_map_type); // show the user which point is being adjusted
+ if (do_ubl_mesh_map) display_map(g29_map_type); // Display the current point
lcd_refresh();
float new_z = z_values[location.x_index][location.y_index];
- if (isnan(new_z)) new_z = 0.0; // Set invalid mesh points to 0.0 so they can be edited
- new_z = FLOOR(new_z * 1000.0) * 0.001; // Chop off digits after the 1000ths place
+ if (isnan(new_z)) new_z = 0; // Invalid points begin at 0
+ new_z = FLOOR(new_z * 1000) * 0.001f; // Chop off digits after the 1000ths place
lcd_mesh_edit_setup(new_z);
do {
new_z = lcd_mesh_edit();
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
- do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited
+ do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited
#endif
idle();
- SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
+ SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (!is_lcd_clicked());
- if (!lcd_map_control) lcd_return_to_status();
+ if (!lcd_map_control) lcd_return_to_status(); // Just editing a single point? Return to status
- // The technique used here generates a race condition for the encoder click.
- // It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune) or here.
- // Let's work on specifying a proper API for the LCD ASAP, OK?
- lcd_external_control = true;
-
- if (click_and_hold(abort_fine_tune))
- goto FINE_TUNE_EXIT;
-
- safe_delay(20); // We don't want any switch noise.
+ if (click_and_hold(abort_fine_tune)) goto FINE_TUNE_EXIT; // If the click is held down, abort editing
- z_values[location.x_index][location.y_index] = new_z;
+ z_values[location.x_index][location.y_index] = new_z; // Save the updated Z value
+ safe_delay(20); // No switch noise
lcd_refresh();
} while (location.x_index >= 0 && --g29_repetition_cnt > 0);
@@ -1465,7 +1465,7 @@
if (z_values[x1][y1] < z_values[x2][y2]) // Angled downward?
z_values[x][y] = z_values[x1][y1]; // Use nearest (maybe a little too high.)
else
- z_values[x][y] = 2.0 * z_values[x1][y1] - z_values[x2][y2]; // Angled upward...
+ z_values[x][y] = 2.0f * z_values[x1][y1] - z_values[x2][y2]; // Angled upward...
return true;
}
return false;
@@ -1502,18 +1502,20 @@
#if HAS_BED_PROBE
+ #include "../../../libs/vector_3.h"
+
void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) {
- constexpr int16_t x_min = max(MIN_PROBE_X, MESH_MIN_X),
- x_max = min(MAX_PROBE_X, MESH_MAX_X),
- y_min = max(MIN_PROBE_Y, MESH_MIN_Y),
- y_max = min(MAX_PROBE_Y, MESH_MAX_Y);
+ constexpr int16_t x_min = MAX(MIN_PROBE_X, MESH_MIN_X),
+ x_max = MIN(MAX_PROBE_X, MESH_MAX_X),
+ y_min = MAX(MIN_PROBE_Y, MESH_MIN_Y),
+ y_max = MIN(MAX_PROBE_Y, MESH_MAX_Y);
bool abort_flag = false;
float measured_z;
- const float dx = float(x_max - x_min) / (g29_grid_size - 1.0),
- dy = float(y_max - y_min) / (g29_grid_size - 1.0);
+ const float dx = float(x_max - x_min) / (g29_grid_size - 1),
+ dy = float(y_max - y_min) / (g29_grid_size - 1);
struct linear_fit_data lsf_results;
@@ -1565,6 +1567,11 @@
}
}
+ STOW_PROBE();
+ #ifdef Z_AFTER_PROBING
+ move_z_after_probing();
+ #endif
+
if (abort_flag) {
SERIAL_ECHOPGM("?Error probing point. Aborting operation.\n");
return;
@@ -1610,22 +1617,28 @@
SERIAL_EOL();
}
#endif
-
+ if (g29_verbose_level > 3) {
+ serial_spaces(16);
+ SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
+ }
incremental_LSF(&lsf_results, rx, ry, measured_z);
}
}
zig_zag ^= true;
}
-
}
+ STOW_PROBE();
+ #ifdef Z_AFTER_PROBING
+ move_z_after_probing();
+ #endif
if (abort_flag || finish_incremental_LSF(&lsf_results)) {
SERIAL_ECHOPGM("Could not complete LSF!");
return;
}
- vector_3 normal = vector_3(lsf_results.A, lsf_results.B, 1.0000).get_normal();
+ vector_3 normal = vector_3(lsf_results.A, lsf_results.B, 1).get_normal();
if (g29_verbose_level > 2) {
SERIAL_ECHOPGM("bed plane normal = [");
@@ -1704,7 +1717,7 @@
* The only difference is just 3 points are used in the calculations. That fact guarantees
* each probed point should have an exact match when a get_z_correction() for that location
* is calculated. The Z error between the probed point locations and the get_z_correction()
- * numbers for those locations should be 0.000
+ * numbers for those locations should be 0.
*/
#if 0
float t, t1, d;
@@ -1734,13 +1747,13 @@
SERIAL_EOL();
t = normal.x * (Z_SAFE_HOMING_X_POINT) + normal.y * (Z_SAFE_HOMING_Y_POINT);
- d = t + normal.z * 0.000;
+ d = t + normal.z * 0;
SERIAL_ECHOPGM("D from home location with Z=0 : ");
SERIAL_ECHO_F(d, 6);
SERIAL_EOL();
t = normal.x * (Z_SAFE_HOMING_X_POINT) + normal.y * (Z_SAFE_HOMING_Y_POINT);
- d = t + get_z_correction(Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT); // normal.z * 0.000;
+ d = t + get_z_correction(Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT); // normal.z * 0;
SERIAL_ECHOPGM("D from home location using mesh value for Z: ");
SERIAL_ECHO_F(d, 6);
@@ -1771,7 +1784,7 @@
SERIAL_ECHOPGM("Extrapolating mesh...");
- const float weight_scaled = weight_factor * max(MESH_X_DIST, MESH_Y_DIST);
+ const float weight_scaled = weight_factor * MAX(MESH_X_DIST, MESH_Y_DIST);
for (uint8_t jx = 0; jx < GRID_MAX_POINTS_X; jx++)
for (uint8_t jy = 0; jy < GRID_MAX_POINTS_Y; jy++)
@@ -1791,7 +1804,7 @@
if (TEST(bitmap[jx], jy)) {
const float ry = mesh_index_to_ypos(jy),
rz = z_values[jx][jy],
- w = 1.0 + weight_scaled / HYPOT((rx - px), (ry - py));
+ w = 1 + weight_scaled / HYPOT((rx - px), (ry - py));
incremental_WLSF(&lsf_results, rx, ry, rz, w);
}
}
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
index 8e8b5256d79f..85ed86838eb8 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
@@ -75,19 +75,16 @@
debug_current_and_destination(PSTR("Start of ubl.line_to_destination_cartesian()"));
}
- if (cell_start_xi == cell_dest_xi && cell_start_yi == cell_dest_yi) { // if the whole move is within the same cell,
- /**
- * we don't need to break up the move
- *
- * If we are moving off the print bed, we are going to allow the move at this level.
- * But we detect it and isolate it. For now, we just pass along the request.
- */
+ // A move within the same cell needs no splitting
+ if (cell_start_xi == cell_dest_xi && cell_start_yi == cell_dest_yi) {
+ // For a move off the bed, use a constant Z raise
if (!WITHIN(cell_dest_xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(cell_dest_yi, 0, GRID_MAX_POINTS_Y - 1)) {
// Note: There is no Z Correction in this case. We are off the grid and don't know what
// a reasonable correction would be. If the user has specified a UBL_Z_RAISE_WHEN_OFF_MESH
// value, that will be used instead of a calculated (Bi-Linear interpolation) correction.
+
const float z_raise = 0.0
#ifdef UBL_Z_RAISE_WHEN_OFF_MESH
+ UBL_Z_RAISE_WHEN_OFF_MESH
@@ -104,16 +101,8 @@
FINAL_MOVE:
- /**
- * Optimize some floating point operations here. We could call float get_z_correction(float x0, float y0) to
- * generate the correction for us. But we can lighten the load on the CPU by doing a modified version of the function.
- * We are going to only calculate the amount we are from the first mesh line towards the second mesh line once.
- * We will use this fraction in both of the original two Z Height calculations for the bi-linear interpolation. And,
- * instead of doing a generic divide of the distance, we know the distance is MESH_X_DIST so we can use the preprocessor
- * to create a 1-over number for us. That will allow us to do a floating point multiply instead of a floating point divide.
- */
-
- const float xratio = (end[X_AXIS] - mesh_index_to_xpos(cell_dest_xi)) * (1.0 / (MESH_X_DIST));
+ // The distance is always MESH_X_DIST so multiply by the constant reciprocal.
+ const float xratio = (end[X_AXIS] - mesh_index_to_xpos(cell_dest_xi)) * (1.0f / (MESH_X_DIST));
float z1 = z_values[cell_dest_xi ][cell_dest_yi ] + xratio *
(z_values[cell_dest_xi + 1][cell_dest_yi ] - z_values[cell_dest_xi][cell_dest_yi ]),
@@ -122,22 +111,13 @@
if (cell_dest_xi >= GRID_MAX_POINTS_X - 1) z1 = z2 = 0.0;
- // we are done with the fractional X distance into the cell. Now with the two Z-Heights we have calculated, we
- // are going to apply the Y-Distance into the cell to interpolate the final Z correction.
-
- const float yratio = (end[Y_AXIS] - mesh_index_to_ypos(cell_dest_yi)) * (1.0 / (MESH_Y_DIST));
- float z0 = cell_dest_yi < GRID_MAX_POINTS_Y - 1 ? (z1 + (z2 - z1) * yratio) * planner.fade_scaling_factor_for_z(end[Z_AXIS]) : 0.0;
+ // X cell-fraction done. Interpolate the two Z offsets with the Y fraction for the final Z offset.
+ const float yratio = (end[Y_AXIS] - mesh_index_to_ypos(cell_dest_yi)) * (1.0f / (MESH_Y_DIST)),
+ z0 = cell_dest_yi < GRID_MAX_POINTS_Y - 1 ? (z1 + (z2 - z1) * yratio) * planner.fade_scaling_factor_for_z(end[Z_AXIS]) : 0.0;
- /**
- * If part of the Mesh is undefined, it will show up as NAN
- * in z_values[][] and propagate through the
- * calculations. If our correction is NAN, we throw it out
- * because part of the Mesh is undefined and we don't have the
- * information we need to complete the height correction.
- */
- if (isnan(z0)) z0 = 0.0;
-
- planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0, end[E_AXIS], feed_rate, extruder);
+ // Undefined parts of the Mesh in z_values[][] are NAN.
+ // Replace NAN corrections with 0.0 to prevent NAN propagation.
+ planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + (isnan(z0) ? 0.0 : z0), end[E_AXIS], feed_rate, extruder);
if (g26_debug_flag)
debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination_cartesian()"));
@@ -147,11 +127,8 @@
}
/**
- * If we get here, we are processing a move that crosses at least one Mesh Line. We will check
- * for the simple case of just crossing X or just crossing Y Mesh Lines after we get all the details
- * of the move figured out. We can process the easy case of just crossing an X or Y Mesh Line with less
- * computation and in fact most lines are of this nature. We will check for that in the following
- * blocks of code:
+ * Past this point the move is known to cross one or more mesh lines. Check for the most common
+ * case - crossing only one X or Y line - after details are worked out to reduce computation.
*/
const float dx = end[X_AXIS] - start[X_AXIS],
@@ -167,12 +144,11 @@
dyi = cell_start_yi == cell_dest_yi ? 0 : down_flag ? -1 : 1;
/**
- * Compute the scaling factor for the extruder for each partial move.
- * We need to watch out for zero length moves because it will cause us to
- * have an infinate scaling factor. We are stuck doing a floating point
- * divide to get our scaling factor, but after that, we just multiply by this
- * number. We also pick our scaling factor based on whether the X or Y
- * component is larger. We use the biggest of the two to preserve precision.
+ * Compute the extruder scaling factor for each partial move, checking for
+ * zero-length moves that would result in an infinite scaling factor.
+ * A float divide is required for this, but then it just multiplies.
+ * Also select a scaling factor based on the larger of the X and Y
+ * components. The larger of the two is used to preserve precision.
*/
const bool use_x_dist = adx > ady;
@@ -192,43 +168,37 @@
const bool inf_normalized_flag = (isinf(e_normalized_dist) != 0),
inf_m_flag = (isinf(m) != 0);
+
/**
- * This block handles vertical lines. These are lines that stay within the same
- * X Cell column. They do not need to be perfectly vertical. They just can
- * not cross into another X Cell column.
+ * Handle vertical lines that stay within one column.
+ * These need not be perfectly vertical.
*/
- if (dxi == 0) { // Check for a vertical line
- current_yi += down_flag; // Line is heading down, we just want to go to the bottom
+ if (dxi == 0) { // Vertical line?
+ current_yi += down_flag; // Line going down? Just go to the bottom.
while (current_yi != cell_dest_yi + down_flag) {
current_yi += dyi;
const float next_mesh_line_y = mesh_index_to_ypos(current_yi);
/**
- * if the slope of the line is infinite, we won't do the calculations
- * else, we know the next X is the same so we can recover and continue!
- * Calculate X at the next Y mesh line
+ * Skip the calculations for an infinite slope.
+ * For others the next X is the same so this can continue.
+ * Calculate X at the next Y mesh line.
*/
const float rx = inf_m_flag ? start[X_AXIS] : (next_mesh_line_y - c) / m;
float z0 = z_correction_for_x_on_horizontal_mesh_line(rx, current_xi, current_yi)
* planner.fade_scaling_factor_for_z(end[Z_AXIS]);
- /**
- * If part of the Mesh is undefined, it will show up as NAN
- * in z_values[][] and propagate through the
- * calculations. If our correction is NAN, we throw it out
- * because part of the Mesh is undefined and we don't have the
- * information we need to complete the height correction.
- */
+ // Undefined parts of the Mesh in z_values[][] are NAN.
+ // Replace NAN corrections with 0.0 to prevent NAN propagation.
if (isnan(z0)) z0 = 0.0;
const float ry = mesh_index_to_ypos(current_yi);
/**
- * Without this check, it is possible for the algorithm to generate a zero length move in the case
- * where the line is heading down and it is starting right on a Mesh Line boundary. For how often that
- * happens, it might be best to remove the check and always 'schedule' the move because
- * the planner.buffer_segment() routine will filter it if that happens.
+ * Without this check, it's possible to generate a zero length move, as in the case where
+ * the line is heading down, starting exactly on a mesh line boundary. Since this is rare
+ * it might be fine to remove this check and let planner.buffer_segment() filter it out.
*/
if (ry != start[Y_AXIS]) {
if (!inf_normalized_flag) {
@@ -248,9 +218,7 @@
if (g26_debug_flag)
debug_current_and_destination(PSTR("vertical move done in ubl.line_to_destination_cartesian()"));
- //
- // Check if we are at the final destination. Usually, we won't be, but if it is on a Y Mesh Line, we are done.
- //
+ // At the final destination? Usually not, but when on a Y Mesh Line it's completed.
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
goto FINAL_MOVE;
@@ -259,16 +227,11 @@
}
/**
- *
- * This block handles horizontal lines. These are lines that stay within the same
- * Y Cell row. They do not need to be perfectly horizontal. They just can
- * not cross into another Y Cell row.
- *
+ * Handle horizontal lines that stay within one row.
+ * These need not be perfectly horizontal.
*/
-
- if (dyi == 0) { // Check for a horizontal line
- current_xi += left_flag; // Line is heading left, we just want to go to the left
- // edge of this cell for the first move.
+ if (dyi == 0) { // Horizontal line?
+ current_xi += left_flag; // Heading left? Just go to the left edge of the cell for the first move.
while (current_xi != cell_dest_xi + left_flag) {
current_xi += dxi;
const float next_mesh_line_x = mesh_index_to_xpos(current_xi),
@@ -277,22 +240,16 @@
float z0 = z_correction_for_y_on_vertical_mesh_line(ry, current_xi, current_yi)
* planner.fade_scaling_factor_for_z(end[Z_AXIS]);
- /**
- * If part of the Mesh is undefined, it will show up as NAN
- * in z_values[][] and propagate through the
- * calculations. If our correction is NAN, we throw it out
- * because part of the Mesh is undefined and we don't have the
- * information we need to complete the height correction.
- */
+ // Undefined parts of the Mesh in z_values[][] are NAN.
+ // Replace NAN corrections with 0.0 to prevent NAN propagation.
if (isnan(z0)) z0 = 0.0;
const float rx = mesh_index_to_xpos(current_xi);
/**
- * Without this check, it is possible for the algorithm to generate a zero length move in the case
- * where the line is heading left and it is starting right on a Mesh Line boundary. For how often
- * that happens, it might be best to remove the check and always 'schedule' the move because
- * the planner.buffer_segment() routine will filter it if that happens.
+ * Without this check, it's possible to generate a zero length move, as in the case where
+ * the line is heading left, starting exactly on a mesh line boundary. Since this is rare
+ * it might be fine to remove this check and let planner.buffer_segment() filter it out.
*/
if (rx != start[X_AXIS]) {
if (!inf_normalized_flag) {
@@ -305,7 +262,8 @@
z_position = end[Z_AXIS];
}
- planner.buffer_segment(rx, ry, z_position + z0, e_position, feed_rate, extruder);
+ if (!planner.buffer_segment(rx, ry, z_position + z0, e_position, feed_rate, extruder))
+ break;
} //else printf("FIRST MOVE PRUNED ");
}
@@ -321,7 +279,7 @@
/**
*
- * This block handles the generic case of a line crossing both X and Y Mesh lines.
+ * Handle the generic case of a line crossing both X and Y Mesh lines.
*
*/
@@ -334,7 +292,7 @@
current_xi += left_flag;
current_yi += down_flag;
- while (xi_cnt > 0 || yi_cnt > 0) {
+ while (xi_cnt || yi_cnt) {
const float next_mesh_line_x = mesh_index_to_xpos(current_xi + dxi),
next_mesh_line_y = mesh_index_to_ypos(current_yi + dyi),
@@ -349,13 +307,8 @@
float z0 = z_correction_for_x_on_horizontal_mesh_line(rx, current_xi - left_flag, current_yi + dyi)
* planner.fade_scaling_factor_for_z(end[Z_AXIS]);
- /**
- * If part of the Mesh is undefined, it will show up as NAN
- * in z_values[][] and propagate through the
- * calculations. If our correction is NAN, we throw it out
- * because part of the Mesh is undefined and we don't have the
- * information we need to complete the height correction.
- */
+ // Undefined parts of the Mesh in z_values[][] are NAN.
+ // Replace NAN corrections with 0.0 to prevent NAN propagation.
if (isnan(z0)) z0 = 0.0;
if (!inf_normalized_flag) {
@@ -367,7 +320,8 @@
e_position = end[E_AXIS];
z_position = end[Z_AXIS];
}
- planner.buffer_segment(rx, next_mesh_line_y, z_position + z0, e_position, feed_rate, extruder);
+ if (!planner.buffer_segment(rx, next_mesh_line_y, z_position + z0, e_position, feed_rate, extruder))
+ break;
current_yi += dyi;
yi_cnt--;
}
@@ -376,13 +330,8 @@
float z0 = z_correction_for_y_on_vertical_mesh_line(ry, current_xi + dxi, current_yi - down_flag)
* planner.fade_scaling_factor_for_z(end[Z_AXIS]);
- /**
- * If part of the Mesh is undefined, it will show up as NAN
- * in z_values[][] and propagate through the
- * calculations. If our correction is NAN, we throw it out
- * because part of the Mesh is undefined and we don't have the
- * information we need to complete the height correction.
- */
+ // Undefined parts of the Mesh in z_values[][] are NAN.
+ // Replace NAN corrections with 0.0 to prevent NAN propagation.
if (isnan(z0)) z0 = 0.0;
if (!inf_normalized_flag) {
@@ -395,12 +344,13 @@
z_position = end[Z_AXIS];
}
- planner.buffer_segment(next_mesh_line_x, ry, z_position + z0, e_position, feed_rate, extruder);
+ if (!planner.buffer_segment(next_mesh_line_x, ry, z_position + z0, e_position, feed_rate, extruder))
+ break;
current_xi += dxi;
xi_cnt--;
}
- if (xi_cnt < 0 || yi_cnt < 0) break; // we've gone too far, so exit the loop and move on to FINAL_MOVE
+ if (xi_cnt < 0 || yi_cnt < 0) break; // Too far! Exit the loop and go to FINAL_MOVE
}
if (g26_debug_flag)
@@ -440,11 +390,11 @@
inverse_kinematics(raw); // this writes delta[ABC] from raw[XYZE]
// should move the feedrate scaling to scara inverse_kinematics
- const float adiff = FABS(delta[A_AXIS] - scara_oldA),
- bdiff = FABS(delta[B_AXIS] - scara_oldB);
+ const float adiff = ABS(delta[A_AXIS] - scara_oldA),
+ bdiff = ABS(delta[B_AXIS] - scara_oldB);
scara_oldA = delta[A_AXIS];
scara_oldB = delta[B_AXIS];
- float s_feedrate = max(adiff, bdiff) * scara_feed_factor;
+ float s_feedrate = MAX(adiff, bdiff) * scara_feed_factor;
planner.buffer_segment(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], in_raw[E_AXIS], s_feedrate, active_extruder);
@@ -490,19 +440,19 @@
#if IS_KINEMATIC
const float seconds = cartesian_xy_mm / feedrate; // seconds to move xy distance at requested rate
uint16_t segments = lroundf(delta_segments_per_second * seconds), // preferred number of segments for distance @ feedrate
- seglimit = lroundf(cartesian_xy_mm * (1.0 / (DELTA_SEGMENT_MIN_LENGTH))); // number of segments at minimum segment length
+ seglimit = lroundf(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // number of segments at minimum segment length
NOMORE(segments, seglimit); // limit to minimum segment length (fewer segments)
#else
- uint16_t segments = lroundf(cartesian_xy_mm * (1.0 / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
+ uint16_t segments = lroundf(cartesian_xy_mm * (1.0f / (DELTA_SEGMENT_MIN_LENGTH))); // cartesian fixed segment length
#endif
- NOLESS(segments, 1); // must have at least one segment
- const float inv_segments = 1.0 / segments; // divide once, multiply thereafter
+ NOLESS(segments, 1U); // must have at least one segment
+ const float inv_segments = 1.0f / segments; // divide once, multiply thereafter
#if IS_SCARA // scale the feed rate from mm/s to degrees/s
scara_feed_factor = cartesian_xy_mm * inv_segments * feedrate;
- scara_oldA = stepper.get_axis_position_degrees(A_AXIS);
- scara_oldB = stepper.get_axis_position_degrees(B_AXIS);
+ scara_oldA = planner.get_axis_position_degrees(A_AXIS);
+ scara_oldB = planner.get_axis_position_degrees(B_AXIS);
#endif
const float diff[XYZE] = {
@@ -550,8 +500,8 @@
// in top of loop and again re-find same adjacent cell and use it, just less efficient
// for mesh inset area.
- int8_t cell_xi = (raw[X_AXIS] - (MESH_MIN_X)) * (1.0 / (MESH_X_DIST)),
- cell_yi = (raw[Y_AXIS] - (MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
+ int8_t cell_xi = (raw[X_AXIS] - (MESH_MIN_X)) * (1.0f / (MESH_X_DIST)),
+ cell_yi = (raw[Y_AXIS] - (MESH_MIN_Y)) * (1.0f / (MESH_Y_DIST));
cell_xi = constrain(cell_xi, 0, (GRID_MAX_POINTS_X) - 1);
cell_yi = constrain(cell_yi, 0, (GRID_MAX_POINTS_Y) - 1);
@@ -572,15 +522,15 @@
float cx = raw[X_AXIS] - x0, // cell-relative x and y
cy = raw[Y_AXIS] - y0;
- const float z_xmy0 = (z_x1y0 - z_x0y0) * (1.0 / (MESH_X_DIST)), // z slope per x along y0 (lower left to lower right)
- z_xmy1 = (z_x1y1 - z_x0y1) * (1.0 / (MESH_X_DIST)); // z slope per x along y1 (upper left to upper right)
+ const float z_xmy0 = (z_x1y0 - z_x0y0) * (1.0f / (MESH_X_DIST)), // z slope per x along y0 (lower left to lower right)
+ z_xmy1 = (z_x1y1 - z_x0y1) * (1.0f / (MESH_X_DIST)); // z slope per x along y1 (upper left to upper right)
float z_cxy0 = z_x0y0 + z_xmy0 * cx; // z height along y0 at cx (changes for each cx in cell)
const float z_cxy1 = z_x0y1 + z_xmy1 * cx, // z height along y1 at cx
z_cxyd = z_cxy1 - z_cxy0; // z height difference along cx from y0 to y1
- float z_cxym = z_cxyd * (1.0 / (MESH_Y_DIST)); // z slope per y along cx from y0 to y1 (changes for each cx in cell)
+ float z_cxym = z_cxyd * (1.0f / (MESH_Y_DIST)); // z slope per y along cx from y0 to y1 (changes for each cx in cell)
// float z_cxcy = z_cxy0 + z_cxym * cy; // interpolated mesh z height along cx at cy (do inside the segment loop)
@@ -589,7 +539,7 @@
// each change by a constant for fixed segment lengths.
const float z_sxy0 = z_xmy0 * diff[X_AXIS], // per-segment adjustment to z_cxy0
- z_sxym = (z_xmy1 - z_xmy0) * (1.0 / (MESH_Y_DIST)) * diff[X_AXIS]; // per-segment adjustment to z_cxym
+ z_sxym = (z_xmy1 - z_xmy0) * (1.0f / (MESH_Y_DIST)) * diff[X_AXIS]; // per-segment adjustment to z_cxym
for (;;) { // for all segments within this mesh cell
diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp
index 6a770b6607fe..e1d6fc5ef4b3 100644
--- a/Marlin/src/feature/controllerfan.cpp
+++ b/Marlin/src/feature/controllerfan.cpp
@@ -35,7 +35,10 @@ void controllerfan_update() {
const millis_t ms = millis();
if (ELAPSED(ms, nextMotorCheck)) {
nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s
- if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || thermalManager.soft_pwm_amount_bed > 0
+ if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
+ #if HAS_HEATED_BED
+ || thermalManager.soft_pwm_amount_bed > 0
+ #endif
|| E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
#if E_STEPPERS > 1
|| E1_ENABLE_READ == E_ENABLE_ON
diff --git a/Marlin/src/feature/dac/dac_dac084s085.cpp b/Marlin/src/feature/dac/dac_dac084s085.cpp
index e1aeb7e4386d..934b3165bd14 100644
--- a/Marlin/src/feature/dac/dac_dac084s085.cpp
+++ b/Marlin/src/feature/dac/dac_dac084s085.cpp
@@ -12,6 +12,7 @@
#include "../../Marlin.h"
#include "../../module/stepper.h"
+#include "../../HAL/Delay.h"
dac084s085::dac084s085() { }
@@ -27,11 +28,11 @@ void dac084s085::begin() {
spiBegin();
//init onboard DAC
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC0_SYNC, LOW);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC0_SYNC, HIGH);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC0_SYNC, LOW);
spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf));
@@ -39,11 +40,11 @@ void dac084s085::begin() {
#if EXTRUDERS > 1
//init Piggy DAC
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC1_SYNC, LOW);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC1_SYNC, HIGH);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC1_SYNC, LOW);
spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf));
@@ -66,20 +67,20 @@ void dac084s085::setValue(const uint8_t channel, const uint8_t value) {
if (channel > 3) { // DAC Piggy E1,E2,E3
WRITE(DAC1_SYNC, LOW);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC1_SYNC, HIGH);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC1_SYNC, LOW);
}
else { // DAC onboard X,Y,Z,E0
WRITE(DAC0_SYNC, LOW);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC0_SYNC, HIGH);
- delayMicroseconds(2U);
+ DELAY_US(2);
WRITE(DAC0_SYNC, LOW);
}
- delayMicroseconds(2U);
+ DELAY_US(2);
spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf));
}
diff --git a/Marlin/src/feature/dac/stepper_dac.cpp b/Marlin/src/feature/dac/stepper_dac.cpp
index 458eb61f1ad4..b5ea77a029f8 100644
--- a/Marlin/src/feature/dac/stepper_dac.cpp
+++ b/Marlin/src/feature/dac/stepper_dac.cpp
@@ -91,8 +91,8 @@ void dac_current_raw(uint8_t channel, uint16_t val) {
mcp4728_simpleCommand(UPDATE);
}
-static float dac_perc(int8_t n) { return 100.0 * mcp4728_getValue(dac_order[n]) * (1.0 / (DAC_STEPPER_MAX)); }
-static float dac_amps(int8_t n) { return mcp4728_getDrvPct(dac_order[n]) * (DAC_STEPPER_MAX) * 0.125 * (1.0 / (DAC_STEPPER_SENSE)); }
+static float dac_perc(int8_t n) { return 100.0 * mcp4728_getValue(dac_order[n]) * (1.0f / (DAC_STEPPER_MAX)); }
+static float dac_amps(int8_t n) { return mcp4728_getDrvPct(dac_order[n]) * (DAC_STEPPER_MAX) * 0.125 * (1.0f / (DAC_STEPPER_SENSE)); }
uint8_t dac_current_get_percent(AxisEnum axis) { return mcp4728_getDrvPct(dac_order[axis]); }
void dac_current_set_percents(const uint8_t pct[XYZE]) {
diff --git a/Marlin/src/feature/digipot/digipot_mcp4018.cpp b/Marlin/src/feature/digipot/digipot_mcp4018.cpp
index 5ae24188fd4b..e59c3d52696e 100644
--- a/Marlin/src/feature/digipot/digipot_mcp4018.cpp
+++ b/Marlin/src/feature/digipot/digipot_mcp4018.cpp
@@ -87,7 +87,7 @@ static void i2c_send(const uint8_t channel, const byte v) {
// This is for the MCP4018 I2C based digipot
void digipot_i2c_set_current(const uint8_t channel, const float current) {
- i2c_send(channel, current_to_wiper(min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT))));
+ i2c_send(channel, current_to_wiper(MIN(MAX(current, 0), float(DIGIPOT_A4988_MAX_CURRENT))));
}
void digipot_i2c_init() {
diff --git a/Marlin/src/feature/digipot/digipot_mcp4451.cpp b/Marlin/src/feature/digipot/digipot_mcp4451.cpp
index 2d6ab3147e8d..4609a2c2172d 100644
--- a/Marlin/src/feature/digipot/digipot_mcp4451.cpp
+++ b/Marlin/src/feature/digipot/digipot_mcp4451.cpp
@@ -69,7 +69,7 @@ void digipot_i2c_set_current(const uint8_t channel, const float current) {
// Set actual wiper value
byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
- i2c_send(addr, addresses[channel & 0x3], current_to_wiper(min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT)));
+ i2c_send(addr, addresses[channel & 0x3], current_to_wiper(MIN((float) MAX(current, 0), DIGIPOT_I2C_MAX_CURRENT)));
}
void digipot_i2c_init() {
diff --git a/Marlin/src/feature/emergency_parser.cpp b/Marlin/src/feature/emergency_parser.cpp
new file mode 100644
index 000000000000..3c9cbf12e56a
--- /dev/null
+++ b/Marlin/src/feature/emergency_parser.cpp
@@ -0,0 +1,39 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * emergency_parser.cpp - Intercept special commands directly in the serial stream
+ */
+
+#include "../inc/MarlinConfigPre.h"
+
+#if ENABLED(EMERGENCY_PARSER)
+
+#include "emergency_parser.h"
+
+// Static data members
+bool EmergencyParser::killed_by_M112; // = false
+
+// Global instance
+EmergencyParser emergency_parser;
+
+#endif // EMERGENCY_PARSER
diff --git a/Marlin/src/feature/emergency_parser.h b/Marlin/src/feature/emergency_parser.h
new file mode 100644
index 000000000000..127b5c20daf2
--- /dev/null
+++ b/Marlin/src/feature/emergency_parser.h
@@ -0,0 +1,143 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * emergency_parser.h - Intercept special commands directly in the serial stream
+ */
+
+#ifndef _EMERGENCY_PARSER_H_
+#define _EMERGENCY_PARSER_H_
+
+// External references
+extern volatile bool wait_for_user, wait_for_heatup;
+void quickstop_stepper();
+
+class EmergencyParser {
+
+public:
+
+ // Currently looking for: M108, M112, M410
+ enum State : char {
+ EP_RESET,
+ EP_N,
+ EP_M,
+ EP_M1,
+ EP_M10,
+ EP_M108,
+ EP_M11,
+ EP_M112,
+ EP_M4,
+ EP_M41,
+ EP_M410,
+ EP_IGNORE // to '\n'
+ };
+
+ static bool killed_by_M112;
+
+ EmergencyParser() {}
+
+ __attribute__((always_inline)) inline
+ static void update(State &state, const uint8_t c) {
+
+ switch (state) {
+ case EP_RESET:
+ switch (c) {
+ case ' ': break;
+ case 'N': state = EP_N; break;
+ case 'M': state = EP_M; break;
+ default: state = EP_IGNORE;
+ }
+ break;
+
+ case EP_N:
+ switch (c) {
+ case '0': case '1': case '2':
+ case '3': case '4': case '5':
+ case '6': case '7': case '8':
+ case '9': case '-': case ' ': break;
+ case 'M': state = EP_M; break;
+ default: state = EP_IGNORE;
+ }
+ break;
+
+ case EP_M:
+ switch (c) {
+ case ' ': break;
+ case '1': state = EP_M1; break;
+ case '4': state = EP_M4; break;
+ default: state = EP_IGNORE;
+ }
+ break;
+
+ case EP_M1:
+ switch (c) {
+ case '0': state = EP_M10; break;
+ case '1': state = EP_M11; break;
+ default: state = EP_IGNORE;
+ }
+ break;
+
+ case EP_M10:
+ state = (c == '8') ? EP_M108 : EP_IGNORE;
+ break;
+
+ case EP_M11:
+ state = (c == '2') ? EP_M112 : EP_IGNORE;
+ break;
+
+ case EP_M4:
+ state = (c == '1') ? EP_M41 : EP_IGNORE;
+ break;
+
+ case EP_M41:
+ state = (c == '0') ? EP_M410 : EP_IGNORE;
+ break;
+
+ case EP_IGNORE:
+ if (c == '\n') state = EP_RESET;
+ break;
+
+ default:
+ if (c == '\n') {
+ switch (state) {
+ case EP_M108:
+ wait_for_user = wait_for_heatup = false;
+ break;
+ case EP_M112:
+ killed_by_M112 = true;
+ break;
+ case EP_M410:
+ quickstop_stepper();
+ break;
+ default:
+ break;
+ }
+ state = EP_RESET;
+ }
+ }
+ }
+
+};
+
+extern EmergencyParser emergency_parser;
+
+#endif // _EMERGENCY_PARSER_H_
diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp
index ab070884024e..bc26a97371d1 100644
--- a/Marlin/src/feature/fwretract.cpp
+++ b/Marlin/src/feature/fwretract.cpp
@@ -108,7 +108,7 @@ void FWRetract::retract(const bool retracting
// G11 priority to recover the long retract if activated
if (!retracting) swapping = retracted_swap[active_extruder];
#else
- const bool swapping = false;
+ constexpr bool swapping = false;
#endif
/* // debugging
@@ -118,61 +118,58 @@ void FWRetract::retract(const bool retracting
for (uint8_t i = 0; i < EXTRUDERS; ++i) {
SERIAL_ECHOPAIR("retracted[", i);
SERIAL_ECHOLNPAIR("] ", retracted[i]);
- SERIAL_ECHOPAIR("retracted_swap[", i);
- SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
+ #if EXTRUDERS > 1
+ SERIAL_ECHOPAIR("retracted_swap[", i);
+ SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
+ #endif
}
SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
+ SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]);
SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
//*/
- const float old_feedrate_mm_s = feedrate_mm_s;
+ const float old_feedrate_mm_s = feedrate_mm_s,
+ renormalize = RECIPROCAL(planner.e_factor[active_extruder]),
+ base_retract = swapping ? swap_retract_length : retract_length,
+ old_z = current_position[Z_AXIS],
+ old_e = current_position[E_AXIS];
// The current position will be the destination for E and Z moves
set_destination_from_current();
- stepper.synchronize(); // Wait for buffered moves to complete
-
- const float renormalize = 1.0 / planner.e_factor[active_extruder];
if (retracting) {
// Retract by moving from a faux E position back to the current E position
feedrate_mm_s = retract_feedrate_mm_s;
- current_position[E_AXIS] += (swapping ? swap_retract_length : retract_length) * renormalize;
- sync_plan_position_e();
- prepare_move_to_destination();
+ destination[E_AXIS] -= base_retract * renormalize;
+ prepare_move_to_destination(); // set_current_to_destination
// Is a Z hop set, and has the hop not yet been done?
- // No double zlifting
- // Feedrate to the max
if (retract_zlift > 0.01 && !hop_amount) { // Apply hop only once
- const float old_z = current_position[Z_AXIS];
hop_amount += retract_zlift; // Add to the hop total (again, only once)
destination[Z_AXIS] += retract_zlift; // Raise Z by the zlift (M207 Z) amount
feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS]; // Maximum Z feedrate
- prepare_move_to_destination(); // Raise up
- current_position[Z_AXIS] = old_z; // Spoof the Z position in the planner
- SYNC_PLAN_POSITION_KINEMATIC();
+ prepare_move_to_destination(); // Raise up, set_current_to_destination
}
}
else {
// If a hop was done and Z hasn't changed, undo the Z hop
if (hop_amount) {
- current_position[Z_AXIS] += hop_amount; // Set actual Z (due to the prior hop)
- SYNC_PLAN_POSITION_KINEMATIC(); // Spoof the Z position in the planner
+ current_position[Z_AXIS] += hop_amount; // Restore the actual Z position
+ SYNC_PLAN_POSITION_KINEMATIC(); // Unspoof the position planner
feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS]; // Z feedrate to max
- prepare_move_to_destination(); // Lower Z and update current_position
+ prepare_move_to_destination(); // Lower Z, set_current_to_destination
hop_amount = 0.0; // Clear the hop amount
}
- // A retract multiplier has been added here to get faster swap recovery
+ destination[E_AXIS] += (base_retract + (swapping ? swap_retract_recover_length : retract_recover_length)) * renormalize;
feedrate_mm_s = swapping ? swap_retract_recover_feedrate_mm_s : retract_recover_feedrate_mm_s;
-
- const float move_e = swapping ? swap_retract_length + swap_retract_recover_length : retract_length + retract_recover_length;
- current_position[E_AXIS] -= move_e * renormalize;
- sync_plan_position_e();
- prepare_move_to_destination(); // Recover E
+ prepare_move_to_destination(); // Recover E, set_current_to_destination
}
feedrate_mm_s = old_feedrate_mm_s; // Restore original feedrate
+ current_position[Z_AXIS] = old_z; // Restore Z and E positions
+ current_position[E_AXIS] = old_e;
+ SYNC_PLAN_POSITION_KINEMATIC(); // As if the move never took place
retracted[active_extruder] = retracting; // Active extruder now retracted / recovered
@@ -188,10 +185,13 @@ void FWRetract::retract(const bool retracting
for (uint8_t i = 0; i < EXTRUDERS; ++i) {
SERIAL_ECHOPAIR("retracted[", i);
SERIAL_ECHOLNPAIR("] ", retracted[i]);
- SERIAL_ECHOPAIR("retracted_swap[", i);
- SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
+ #if EXTRUDERS > 1
+ SERIAL_ECHOPAIR("retracted_swap[", i);
+ SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
+ #endif
}
SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
+ SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]);
SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
//*/
diff --git a/Marlin/src/feature/leds/tempstat.cpp b/Marlin/src/feature/leds/tempstat.cpp
index 8f2be49f2a1d..5ab0d2efab4e 100644
--- a/Marlin/src/feature/leds/tempstat.cpp
+++ b/Marlin/src/feature/leds/tempstat.cpp
@@ -37,7 +37,7 @@ void handle_status_leds(void) {
if (ELAPSED(millis(), next_status_led_update_ms)) {
next_status_led_update_ms += 500; // Update every 0.5s
float max_temp = 0.0;
- #if HAS_TEMP_BED
+ #if HAS_HEATED_BED
max_temp = MAX3(max_temp, thermalManager.degTargetBed(), thermalManager.degBed());
#endif
HOTEND_LOOP()
diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp
index 0c5b74293476..62e66122ef6a 100644
--- a/Marlin/src/feature/pause.cpp
+++ b/Marlin/src/feature/pause.cpp
@@ -121,8 +121,8 @@ static void do_pause_e_move(const float &length, const float &fr) {
set_destination_from_current();
destination[E_AXIS] += length / planner.e_factor[active_extruder];
planner.buffer_line_kinematic(destination, fr, active_extruder);
- stepper.synchronize();
set_current_from_destination();
+ planner.synchronize();
}
/**
@@ -137,7 +137,7 @@ static void do_pause_e_move(const float &length, const float &fr) {
*
* Returns 'true' if load was completed, 'false' for abort
*/
-bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
+bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
) {
@@ -184,8 +184,22 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
#endif
- // Load filament
- if (load_length) do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE);
+ // Slow Load filament
+ if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
+
+ // Fast Load Filament
+ if (fast_load_length) {
+ #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
+ const float saved_acceleration = planner.retract_acceleration;
+ planner.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
+ #endif
+
+ do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
+
+ #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
+ planner.retract_acceleration = saved_acceleration;
+ #endif
+ }
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
@@ -196,7 +210,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
wait_for_user = true;
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
- do_pause_e_move(1, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
+ do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
wait_for_user = false;
#else
@@ -210,7 +224,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
#endif
// Extrude filament to get into hotend
- do_pause_e_move(purge_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
+ do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
}
// Show "Purge More" / "Resume" menu and wait for reply
@@ -233,7 +247,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
#endif
);
- #endif
+ #endif
return true;
}
@@ -277,8 +291,17 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]);
// Unload filament
+ #if FILAMENT_CHANGE_UNLOAD_ACCEL > 0
+ const float saved_acceleration = planner.retract_acceleration;
+ planner.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
+ #endif
+
do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE);
+ #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
+ planner.retract_acceleration = saved_acceleration;
+ #endif
+
// Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
#if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
disable_e_stepper(active_extruder);
@@ -343,21 +366,19 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
#endif
print_job_timer.pause();
- // Wait for synchronize steppers
- stepper.synchronize();
-
// Save current position
COPY(resume_position, current_position);
+ // Wait for buffered blocks to complete
+ planner.synchronize();
+
// Initial retract before move to filament change position
if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
- #if ENABLED(NO_MOTION_BEFORE_HOMING)
- if (!axis_unhomed_error())
- #endif
- // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
- Nozzle::park(2, park_point);
+ // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
+ if (!axis_unhomed_error())
+ Nozzle::park(2, park_point);
// Unload the filament
if (unload_length)
@@ -477,7 +498,7 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/) {
* - Send host action for resume, if configured
* - Resume the current SD print job, if any
*/
-void resume_print(const float &load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_EXTRUDE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
+void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
if (!did_pause_print) return;
// Re-enable the heaters if they timed out
@@ -489,7 +510,7 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
// Load the new filament
- load_filament(load_length, purge_length, max_beep_count, true, nozzle_timed_out);
+ load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out);
}
#if ENABLED(ULTIPANEL)
@@ -503,18 +524,19 @@ void resume_print(const float &load_length/*=0*/, const float &purge_length/*=AD
if (fwretract.retracted[active_extruder])
do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
#endif
+
// If resume_position is negative
if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
// Move XY to starting position, then Z
do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], NOZZLE_PARK_XY_FEEDRATE);
- // Set Z_AXIS to saved position
+ // Move Z_AXIS to saved position
do_blocking_move_to_z(resume_position[Z_AXIS], NOZZLE_PARK_Z_FEEDRATE);
// Now all extrusion positions are resumed and ready to be confirmed
// Set extruder to saved position
- planner.set_e_position_mm(destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]);
+ planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]));
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
runout.reset();
diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h
index b2e9e2709533..c920fd599f18 100644
--- a/Marlin/src/feature/pause.h
+++ b/Marlin/src/feature/pause.h
@@ -71,9 +71,9 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
void wait_for_filament_reload(const int8_t max_beep_count=0);
-void resume_print(const float &load_length=0, const float &extrude_length=ADVANCED_PAUSE_EXTRUDE_LENGTH, const int8_t max_beep_count=0);
+void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0);
-bool load_filament(const float &load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
+bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
bool unload_filament(const float &unload_length, const bool show_lcd=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp
index 72b2504cc052..0365980db5a7 100644
--- a/Marlin/src/feature/power.cpp
+++ b/Marlin/src/feature/power.cpp
@@ -50,8 +50,10 @@ bool Power::is_power_needed() {
if (controllerFanSpeed > 0) return true;
#endif
- if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON ||
- thermalManager.soft_pwm_amount_bed > 0
+ if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
+ #if HAS_HEATED_BED
+ || thermalManager.soft_pwm_amount_bed > 0
+ #endif
|| E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
#if E_STEPPERS > 1
|| E1_ENABLE_READ == E_ENABLE_ON
@@ -87,16 +89,18 @@ void Power::check() {
void Power::power_on() {
lastPowerOn = millis();
- PSU_PIN_ON();
+ if (!powersupply_on) {
+ PSU_PIN_ON();
- #if HAS_TRINAMIC
- delay(100); // Wait for power to settle
- restore_stepper_drivers();
- #endif
+ #if HAS_TRINAMIC
+ delay(100); // Wait for power to settle
+ restore_stepper_drivers();
+ #endif
+ }
}
void Power::power_off() {
- PSU_PIN_OFF();
+ if (powersupply_on) PSU_PIN_OFF();
}
#endif // AUTO_POWER_CONTROL
diff --git a/Marlin/src/feature/power_loss_recovery.cpp b/Marlin/src/feature/power_loss_recovery.cpp
new file mode 100644
index 000000000000..095858837385
--- /dev/null
+++ b/Marlin/src/feature/power_loss_recovery.cpp
@@ -0,0 +1,285 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * power_loss_recovery.cpp - Resume an SD print after power-loss
+ */
+
+#include "../inc/MarlinConfigPre.h"
+
+#if ENABLED(POWER_LOSS_RECOVERY)
+
+#include "power_loss_recovery.h"
+
+#include "../lcd/ultralcd.h"
+#include "../gcode/queue.h"
+#include "../module/planner.h"
+#include "../module/printcounter.h"
+#include "../module/temperature.h"
+#include "../sd/cardreader.h"
+#include "../core/serial.h"
+
+// Recovery data
+job_recovery_info_t job_recovery_info;
+JobRecoveryPhase job_recovery_phase = JOB_RECOVERY_IDLE;
+uint8_t job_recovery_commands_count; //=0
+char job_recovery_commands[BUFSIZE + APPEND_CMD_COUNT][MAX_CMD_SIZE];
+// Extern
+extern uint8_t active_extruder, commands_in_queue, cmd_queue_index_r;
+
+#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
+ void debug_print_job_recovery(const bool recovery) {
+ SERIAL_PROTOCOLLNPGM("---- Job Recovery Info ----");
+ SERIAL_PROTOCOLPAIR("valid_head:", int(job_recovery_info.valid_head));
+ SERIAL_PROTOCOLLNPAIR(" valid_foot:", int(job_recovery_info.valid_foot));
+ if (job_recovery_info.valid_head) {
+ if (job_recovery_info.valid_head == job_recovery_info.valid_foot) {
+ SERIAL_PROTOCOLPGM("current_position: ");
+ LOOP_XYZE(i) {
+ SERIAL_PROTOCOL(job_recovery_info.current_position[i]);
+ if (i < E_AXIS) SERIAL_CHAR(',');
+ }
+ SERIAL_EOL();
+ SERIAL_PROTOCOLLNPAIR("feedrate: ", job_recovery_info.feedrate);
+
+ #if HOTENDS > 1
+ SERIAL_PROTOCOLLNPAIR("active_hotend: ", int(job_recovery_info.active_hotend));
+ #endif
+
+ SERIAL_PROTOCOLPGM("target_temperature: ");
+ HOTEND_LOOP() {
+ SERIAL_PROTOCOL(job_recovery_info.target_temperature[e]);
+ if (e < HOTENDS - 1) SERIAL_CHAR(',');
+ }
+ SERIAL_EOL();
+
+ #if HAS_HEATED_BED
+ SERIAL_PROTOCOLLNPAIR("target_temperature_bed: ", job_recovery_info.target_temperature_bed);
+ #endif
+
+ #if FAN_COUNT
+ SERIAL_PROTOCOLPGM("fanSpeeds: ");
+ for (int8_t i = 0; i < FAN_COUNT; i++) {
+ SERIAL_PROTOCOL(job_recovery_info.fanSpeeds[i]);
+ if (i < FAN_COUNT - 1) SERIAL_CHAR(',');
+ }
+ SERIAL_EOL();
+ #endif
+
+ #if HAS_LEVELING
+ SERIAL_PROTOCOLPAIR("leveling: ", int(job_recovery_info.leveling));
+ SERIAL_PROTOCOLLNPAIR(" fade: ", int(job_recovery_info.fade));
+ #endif
+ SERIAL_PROTOCOLLNPAIR("cmd_queue_index_r: ", int(job_recovery_info.cmd_queue_index_r));
+ SERIAL_PROTOCOLLNPAIR("commands_in_queue: ", int(job_recovery_info.commands_in_queue));
+ if (recovery)
+ for (uint8_t i = 0; i < job_recovery_commands_count; i++) SERIAL_PROTOCOLLNPAIR("> ", job_recovery_commands[i]);
+ else
+ for (uint8_t i = 0; i < job_recovery_info.commands_in_queue; i++) SERIAL_PROTOCOLLNPAIR("> ", job_recovery_info.command_queue[i]);
+ SERIAL_PROTOCOLLNPAIR("sd_filename: ", job_recovery_info.sd_filename);
+ SERIAL_PROTOCOLLNPAIR("sdpos: ", job_recovery_info.sdpos);
+ SERIAL_PROTOCOLLNPAIR("print_job_elapsed: ", job_recovery_info.print_job_elapsed);
+ }
+ else
+ SERIAL_PROTOCOLLNPGM("INVALID DATA");
+ }
+ SERIAL_PROTOCOLLNPGM("---------------------------");
+ }
+#endif // DEBUG_POWER_LOSS_RECOVERY
+
+/**
+ * Check for Print Job Recovery during setup()
+ *
+ * If a saved state exists, populate job_recovery_commands with
+ * commands to restore the machine state and continue the file.
+ */
+void check_print_job_recovery() {
+ memset(&job_recovery_info, 0, sizeof(job_recovery_info));
+ ZERO(job_recovery_commands);
+
+ if (!card.cardOK) card.initsd();
+
+ if (card.cardOK) {
+
+ #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
+ SERIAL_PROTOCOLLNPAIR("Init job recovery info. Size: ", int(sizeof(job_recovery_info)));
+ #endif
+
+ if (card.jobRecoverFileExists()) {
+ card.openJobRecoveryFile(true);
+ card.loadJobRecoveryInfo();
+ card.closeJobRecoveryFile();
+ //card.removeJobRecoveryFile();
+
+ if (job_recovery_info.valid_head && job_recovery_info.valid_head == job_recovery_info.valid_foot) {
+
+ uint8_t ind = 0;
+
+ #if HAS_LEVELING
+ strcpy_P(job_recovery_commands[ind++], PSTR("M420 S0 Z0")); // Leveling off before G92 or G28
+ #endif
+
+ strcpy_P(job_recovery_commands[ind++], PSTR("G92.0 Z0")); // Ensure Z is equal to 0
+ strcpy_P(job_recovery_commands[ind++], PSTR("G1 Z2")); // Raise Z by 2mm (we hope!)
+ strcpy_P(job_recovery_commands[ind++], PSTR("G28 R0"
+ #if ENABLED(MARLIN_DEV_MODE)
+ " S"
+ #elif !IS_KINEMATIC
+ " X Y" // Home X and Y for Cartesian
+ #endif
+ ));
+
+ char str_1[16], str_2[16];
+
+ #if HAS_LEVELING
+ if (job_recovery_info.fade || job_recovery_info.leveling) {
+ // Restore leveling state before G92 sets Z
+ // This ensures the steppers correspond to the native Z
+ dtostrf(job_recovery_info.fade, 1, 1, str_1);
+ sprintf_P(job_recovery_commands[ind++], PSTR("M420 S%i Z%s"), int(job_recovery_info.leveling), str_1);
+ }
+ #endif
+
+ dtostrf(job_recovery_info.current_position[Z_AXIS] + 2, 1, 3, str_1);
+ dtostrf(job_recovery_info.current_position[E_AXIS]
+ #if ENABLED(SAVE_EACH_CMD_MODE)
+ - 5
+ #endif
+ , 1, 3, str_2
+ );
+ sprintf_P(job_recovery_commands[ind++], PSTR("G92.0 Z%s E%s"), str_1, str_2); // Current Z + 2 and E
+
+ uint8_t r = job_recovery_info.cmd_queue_index_r, c = job_recovery_info.commands_in_queue;
+ while (c--) {
+ strcpy(job_recovery_commands[ind++], job_recovery_info.command_queue[r]);
+ r = (r + 1) % BUFSIZE;
+ }
+
+ if (job_recovery_info.sd_filename[0] == '/') job_recovery_info.sd_filename[0] = ' ';
+ sprintf_P(job_recovery_commands[ind++], PSTR("M23 %s"), job_recovery_info.sd_filename);
+ sprintf_P(job_recovery_commands[ind++], PSTR("M24 S%ld T%ld"), job_recovery_info.sdpos, job_recovery_info.print_job_elapsed);
+
+ job_recovery_commands_count = ind;
+
+ #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
+ debug_print_job_recovery(true);
+ #endif
+ }
+ else {
+ if (job_recovery_info.valid_head != job_recovery_info.valid_foot)
+ LCD_ALERTMESSAGEPGM("INVALID DATA");
+ memset(&job_recovery_info, 0, sizeof(job_recovery_info));
+ }
+ }
+ }
+}
+
+/**
+ * Save the current machine state to the power-loss recovery file
+ */
+void save_job_recovery_info() {
+ #if SAVE_INFO_INTERVAL_MS > 0
+ static millis_t next_save_ms; // = 0; // Init on reset
+ millis_t ms = millis();
+ #endif
+ if (
+ // Save on every command
+ #if ENABLED(SAVE_EACH_CMD_MODE)
+ true
+ #else
+ // Save if power loss pin is triggered
+ #if PIN_EXISTS(POWER_LOSS)
+ READ(POWER_LOSS_PIN) == POWER_LOSS_STATE ||
+ #endif
+ // Save if interval is elapsed
+ #if SAVE_INFO_INTERVAL_MS > 0
+ ELAPSED(ms, next_save_ms) ||
+ #endif
+ // Save on every new Z height
+ (current_position[Z_AXIS] > 0 && current_position[Z_AXIS] > job_recovery_info.current_position[Z_AXIS])
+ #endif
+ ) {
+ #if SAVE_INFO_INTERVAL_MS > 0
+ next_save_ms = ms + SAVE_INFO_INTERVAL_MS;
+ #endif
+
+ // Head and foot will match if valid data was saved
+ if (!++job_recovery_info.valid_head) ++job_recovery_info.valid_head; // non-zero in sequence
+ job_recovery_info.valid_foot = job_recovery_info.valid_head;
+
+ // Machine state
+ COPY(job_recovery_info.current_position, current_position);
+ job_recovery_info.feedrate = feedrate_mm_s;
+
+ #if HOTENDS > 1
+ job_recovery_info.active_hotend = active_extruder;
+ #endif
+
+ COPY(job_recovery_info.target_temperature, thermalManager.target_temperature);
+
+ #if HAS_HEATED_BED
+ job_recovery_info.target_temperature_bed = thermalManager.target_temperature_bed;
+ #endif
+
+ #if FAN_COUNT
+ COPY(job_recovery_info.fanSpeeds, fanSpeeds);
+ #endif
+
+ #if HAS_LEVELING
+ job_recovery_info.leveling = planner.leveling_active;
+ job_recovery_info.fade = (
+ #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
+ planner.z_fade_height
+ #else
+ 0
+ #endif
+ );
+ #endif
+
+ // Commands in the queue
+ job_recovery_info.cmd_queue_index_r = cmd_queue_index_r;
+ job_recovery_info.commands_in_queue = commands_in_queue;
+ COPY(job_recovery_info.command_queue, command_queue);
+
+ // Elapsed print job time
+ job_recovery_info.print_job_elapsed = print_job_timer.duration();
+
+ // SD file position
+ card.getAbsFilename(job_recovery_info.sd_filename);
+ job_recovery_info.sdpos = card.getIndex();
+
+ #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
+ SERIAL_PROTOCOLLNPGM("Saving...");
+ debug_print_job_recovery(false);
+ #endif
+
+ card.openJobRecoveryFile(false);
+ (void)card.saveJobRecoveryInfo();
+
+ // If power-loss pin was triggered, write just once then kill
+ #if PIN_EXISTS(POWER_LOSS)
+ if (READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) kill(MSG_POWER_LOSS_RECOVERY);
+ #endif
+ }
+}
+
+#endif // POWER_LOSS_RECOVERY
diff --git a/Marlin/src/feature/power_loss_recovery.h b/Marlin/src/feature/power_loss_recovery.h
new file mode 100644
index 000000000000..46a8fd52de3e
--- /dev/null
+++ b/Marlin/src/feature/power_loss_recovery.h
@@ -0,0 +1,99 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * power_loss_recovery.h - Resume an SD print after power-loss
+ */
+
+#ifndef _POWER_LOSS_RECOVERY_H_
+#define _POWER_LOSS_RECOVERY_H_
+
+#include "../sd/cardreader.h"
+#include "../core/types.h"
+#include "../inc/MarlinConfigPre.h"
+
+#define SAVE_INFO_INTERVAL_MS 0
+//#define SAVE_EACH_CMD_MODE
+//#define DEBUG_POWER_LOSS_RECOVERY
+
+typedef struct {
+ uint8_t valid_head;
+
+ // Machine state
+ float current_position[NUM_AXIS], feedrate;
+
+ #if HOTENDS > 1
+ uint8_t active_hotend;
+ #endif
+
+ int16_t target_temperature[HOTENDS];
+
+ #if HAS_HEATED_BED
+ int16_t target_temperature_bed;
+ #endif
+
+ #if FAN_COUNT
+ int16_t fanSpeeds[FAN_COUNT];
+ #endif
+
+ #if HAS_LEVELING
+ bool leveling;
+ float fade;
+ #endif
+
+ // Command queue
+ uint8_t cmd_queue_index_r, commands_in_queue;
+ char command_queue[BUFSIZE][MAX_CMD_SIZE];
+
+ // SD Filename and position
+ char sd_filename[MAXPATHNAMELENGTH];
+ uint32_t sdpos;
+
+ // Job elapsed time
+ millis_t print_job_elapsed;
+
+ uint8_t valid_foot;
+} job_recovery_info_t;
+
+extern job_recovery_info_t job_recovery_info;
+
+enum JobRecoveryPhase : unsigned char {
+ JOB_RECOVERY_IDLE,
+ JOB_RECOVERY_MAYBE,
+ JOB_RECOVERY_YES,
+ JOB_RECOVERY_DONE
+};
+extern JobRecoveryPhase job_recovery_phase;
+
+#if HAS_LEVELING
+ #define APPEND_CMD_COUNT 9
+#else
+ #define APPEND_CMD_COUNT 7
+#endif
+
+extern char job_recovery_commands[BUFSIZE + APPEND_CMD_COUNT][MAX_CMD_SIZE];
+extern uint8_t job_recovery_commands_count;
+
+void check_print_job_recovery();
+void save_job_recovery_info();
+
+#endif // _POWER_LOSS_RECOVERY_H_
diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h
index 37b4dbfba5b3..47bd2cf7b855 100644
--- a/Marlin/src/feature/runout.h
+++ b/Marlin/src/feature/runout.h
@@ -48,7 +48,7 @@ class FilamentRunoutSensor {
if ((IS_SD_PRINTING || print_job_timer.isRunning()) && check() && !filament_ran_out) {
filament_ran_out = true;
enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
- stepper.synchronize();
+ planner.synchronize();
}
}
private:
diff --git a/Marlin/src/feature/snmm.cpp b/Marlin/src/feature/snmm.cpp
index e9ef540d626d..e8c04f219780 100644
--- a/Marlin/src/feature/snmm.cpp
+++ b/Marlin/src/feature/snmm.cpp
@@ -27,7 +27,7 @@
#include "../module/stepper.h"
void select_multiplexed_stepper(const uint8_t e) {
- stepper.synchronize();
+ planner.synchronize();
disable_e_steppers();
WRITE(E_MUX0_PIN, TEST(e, 0) ? HIGH : LOW);
WRITE(E_MUX1_PIN, TEST(e, 1) ? HIGH : LOW);
diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp
index d0a53c1c5506..c7d6cacb1072 100644
--- a/Marlin/src/feature/tmc_util.cpp
+++ b/Marlin/src/feature/tmc_util.cpp
@@ -52,7 +52,7 @@ bool report_tmc_status = false;
bool is_ot;
bool is_error;
};
- #if ENABLED(HAVE_TMC2130)
+ #if HAS_DRIVER(TMC2130)
static uint32_t get_pwm_scale(TMC2130Stepper &st) { return st.PWM_SCALE(); }
static uint8_t get_status_response(TMC2130Stepper &st) { return st.status_response & 0xF; }
static TMC_driver_data get_driver_data(TMC2130Stepper &st) {
@@ -70,7 +70,7 @@ bool report_tmc_status = false;
return data;
}
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAS_DRIVER(TMC2208)
static uint32_t get_pwm_scale(TMC2208Stepper &st) { return st.pwm_scale_sum(); }
static uint8_t get_status_response(TMC2208Stepper &st) {
uint32_t drv_status = st.DRV_STATUS();
@@ -159,21 +159,21 @@ bool report_tmc_status = false;
}
}
- #define HAS_HW_COMMS(ST) ENABLED(ST##_IS_TMC2130)|| (ENABLED(ST##_IS_TMC2208) && defined(ST##_HARDWARE_SERIAL))
+ #define HAS_HW_COMMS(ST) AXIS_DRIVER_TYPE(ST, TMC2130) || (AXIS_DRIVER_TYPE(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL))
void monitor_tmc_driver() {
static millis_t next_cOT = 0;
if (ELAPSED(millis(), next_cOT)) {
next_cOT = millis() + 500;
- #if HAS_HW_COMMS(X) || ENABLED(IS_TRAMS)
+ #if HAS_HW_COMMS(X)
static uint8_t x_otpw_cnt = 0;
monitor_tmc_driver(stepperX, TMC_X, x_otpw_cnt);
#endif
- #if HAS_HW_COMMS(Y) || ENABLED(IS_TRAMS)
+ #if HAS_HW_COMMS(Y)
static uint8_t y_otpw_cnt = 0;
monitor_tmc_driver(stepperY, TMC_Y, y_otpw_cnt);
#endif
- #if HAS_HW_COMMS(Z) || ENABLED(IS_TRAMS)
+ #if HAS_HW_COMMS(Z)
static uint8_t z_otpw_cnt = 0;
monitor_tmc_driver(stepperZ, TMC_Z, z_otpw_cnt);
#endif
@@ -189,7 +189,7 @@ bool report_tmc_status = false;
static uint8_t z2_otpw_cnt = 0;
monitor_tmc_driver(stepperZ2, TMC_Z, z2_otpw_cnt);
#endif
- #if HAS_HW_COMMS(E0) || ENABLED(IS_TRAMS)
+ #if HAS_HW_COMMS(E0)
static uint8_t e0_otpw_cnt = 0;
monitor_tmc_driver(stepperE0, TMC_E0, e0_otpw_cnt);
#endif
@@ -217,12 +217,12 @@ bool report_tmc_status = false;
#endif // MONITOR_DRIVER_STATUS
void _tmc_say_axis(const TMC_AxisEnum axis) {
- const static char ext_X[] PROGMEM = "X", ext_Y[] PROGMEM = "Y", ext_Z[] PROGMEM = "Z",
+ static const char ext_X[] PROGMEM = "X", ext_Y[] PROGMEM = "Y", ext_Z[] PROGMEM = "Z",
ext_X2[] PROGMEM = "X2", ext_Y2[] PROGMEM = "Y2", ext_Z2[] PROGMEM = "Z2",
ext_E0[] PROGMEM = "E0", ext_E1[] PROGMEM = "E1",
ext_E2[] PROGMEM = "E2", ext_E3[] PROGMEM = "E3",
ext_E4[] PROGMEM = "E4";
- const static char* const tmc_axes[] PROGMEM = { ext_X, ext_Y, ext_Z, ext_X2, ext_Y2, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 };
+ static const char* const tmc_axes[] PROGMEM = { ext_X, ext_Y, ext_Z, ext_X2, ext_Y2, ext_Z2, ext_E0, ext_E1, ext_E2, ext_E3, ext_E4 };
serialprintPGM((char*)pgm_read_ptr(&tmc_axes[axis]));
}
@@ -311,7 +311,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
SERIAL_EOL();
}
- #if ENABLED(HAVE_TMC2130)
+ #if HAS_DRIVER(TMC2130)
static void tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) {
switch (i) {
case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break;
@@ -331,7 +331,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
}
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAS_DRIVER(TMC2208)
static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) {
switch (i) {
case TMC_TSTEP: { uint32_t data = 0; st.TSTEP(&data); SERIAL_PROTOCOL(data); break; }
@@ -385,7 +385,10 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
break;
case TMC_TPWMTHRS_MMS: {
uint32_t tpwmthrs_val = st.TPWMTHRS();
- tpwmthrs_val ? SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)) : (void)SERIAL_CHAR('-');
+ if (tpwmthrs_val)
+ SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm));
+ else
+ SERIAL_CHAR('-');
}
break;
case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break;
@@ -417,52 +420,52 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
}
static void tmc_debug_loop(const TMC_debug_enum i) {
- #if X_IS_TRINAMIC
+ #if AXIS_IS_TMC(X)
tmc_status(stepperX, TMC_X, i, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if X2_IS_TRINAMIC
+ #if AXIS_IS_TMC(X2)
tmc_status(stepperX2, TMC_X2, i, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if Y_IS_TRINAMIC
+ #if AXIS_IS_TMC(Y)
tmc_status(stepperY, TMC_Y, i, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if Y2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Y2)
tmc_status(stepperY2, TMC_Y2, i, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if Z_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z)
tmc_status(stepperZ, TMC_Z, i, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if Z2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z2)
tmc_status(stepperZ2, TMC_Z2, i, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if E0_IS_TRINAMIC
+ #if AXIS_IS_TMC(E0)
tmc_status(stepperE0, TMC_E0, i, planner.axis_steps_per_mm[E_AXIS]);
#endif
- #if E1_IS_TRINAMIC
+ #if AXIS_IS_TMC(E1)
tmc_status(stepperE1, TMC_E1, i, planner.axis_steps_per_mm[E_AXIS
#if ENABLED(DISTINCT_E_FACTORS)
+ 1
#endif
]);
#endif
- #if E2_IS_TRINAMIC
+ #if AXIS_IS_TMC(E2)
tmc_status(stepperE2, TMC_E2, i, planner.axis_steps_per_mm[E_AXIS
#if ENABLED(DISTINCT_E_FACTORS)
+ 2
#endif
]);
#endif
- #if E3_IS_TRINAMIC
+ #if AXIS_IS_TMC(E3)
tmc_status(stepperE3, TMC_E3, i, planner.axis_steps_per_mm[E_AXIS
#if ENABLED(DISTINCT_E_FACTORS)
+ 3
#endif
]);
#endif
- #if E4_IS_TRINAMIC
+ #if AXIS_IS_TMC(E4)
tmc_status(stepperE4, TMC_E4, i, planner.axis_steps_per_mm[E_AXIS
#if ENABLED(DISTINCT_E_FACTORS)
+ 4
@@ -474,40 +477,40 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
}
static void drv_status_loop(const TMC_drv_status_enum i) {
- #if X_IS_TRINAMIC
+ #if AXIS_IS_TMC(X)
tmc_parse_drv_status(stepperX, TMC_X, i);
#endif
- #if X2_IS_TRINAMIC
+ #if AXIS_IS_TMC(X2)
tmc_parse_drv_status(stepperX2, TMC_X2, i);
#endif
- #if Y_IS_TRINAMIC
+ #if AXIS_IS_TMC(Y)
tmc_parse_drv_status(stepperY, TMC_Y, i);
#endif
- #if Y2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Y2)
tmc_parse_drv_status(stepperY2, TMC_Y2, i);
#endif
- #if Z_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z)
tmc_parse_drv_status(stepperZ, TMC_Z, i);
#endif
- #if Z2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z2)
tmc_parse_drv_status(stepperZ2, TMC_Z2, i);
#endif
- #if E0_IS_TRINAMIC
+ #if AXIS_IS_TMC(E0)
tmc_parse_drv_status(stepperE0, TMC_E0, i);
#endif
- #if E1_IS_TRINAMIC
+ #if AXIS_IS_TMC(E1)
tmc_parse_drv_status(stepperE1, TMC_E1, i);
#endif
- #if E2_IS_TRINAMIC
+ #if AXIS_IS_TMC(E2)
tmc_parse_drv_status(stepperE2, TMC_E2, i);
#endif
- #if E3_IS_TRINAMIC
+ #if AXIS_IS_TMC(E3)
tmc_parse_drv_status(stepperE3, TMC_E3, i);
#endif
- #if E4_IS_TRINAMIC
+ #if AXIS_IS_TMC(E4)
tmc_parse_drv_status(stepperE4, TMC_E4, i);
#endif
@@ -533,7 +536,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
TMC_REPORT("Run current", TMC_IRUN);
TMC_REPORT("Hold current", TMC_IHOLD);
TMC_REPORT("CS actual\t", TMC_CS_ACTUAL);
- TMC_REPORT("PWM scale", TMC_PWM_SCALE);
+ TMC_REPORT("PWM scale\t", TMC_PWM_SCALE);
TMC_REPORT("vsense\t", TMC_VSENSE);
TMC_REPORT("stealthChop", TMC_STEALTHCHOP);
TMC_REPORT("msteps\t", TMC_MICROSTEPS);
@@ -550,7 +553,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
TMC_REPORT("Stallguard thrs", TMC_SGT);
DRV_REPORT("DRVSTATUS", TMC_DRV_CODES);
- #if ENABLED(HAVE_TMC2130)
+ #if HAS_DRIVER(TMC2130)
DRV_REPORT("stallguard\t", TMC_STALLGUARD);
DRV_REPORT("sg_result\t", TMC_SG_RESULT);
DRV_REPORT("fsactive\t", TMC_FSACTIVE);
@@ -562,7 +565,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
DRV_REPORT("s2ga\t", TMC_S2GA);
DRV_REPORT("otpw\t", TMC_DRV_OTPW);
DRV_REPORT("ot\t", TMC_OT);
- #if ENABLED(HAVE_TMC2208)
+ #if HAS_DRIVER(TMC2208)
DRV_REPORT("157C\t", TMC_T157);
DRV_REPORT("150C\t", TMC_T150);
DRV_REPORT("143C\t", TMC_T143);
@@ -578,9 +581,9 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
#if ENABLED(SENSORLESS_HOMING)
- void tmc_sensorless_homing(TMC2130Stepper &st, bool enable/*=true*/) {
+ void tmc_sensorless_homing(TMC2130Stepper &st, const bool enable/*=true*/) {
+ st.coolstep_min_speed(enable ? 1024UL * 1024UL - 1UL : 0);
#if ENABLED(STEALTHCHOP)
- st.coolstep_min_speed(enable ? 1024UL * 1024UL - 1UL : 0);
st.stealthChop(!enable);
#endif
st.diag1_stall(enable ? 1 : 0);
@@ -588,43 +591,43 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
#endif // SENSORLESS_HOMING
-#if ENABLED(HAVE_TMC2130)
+#if HAS_DRIVER(TMC2130)
#define SET_CS_PIN(st) OUT_WRITE(st##_CS_PIN, HIGH)
void tmc_init_cs_pins() {
- #if ENABLED(X_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(X, TMC2130)
SET_CS_PIN(X);
#endif
- #if ENABLED(Y_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(Y, TMC2130)
SET_CS_PIN(Y);
#endif
- #if ENABLED(Z_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(Z, TMC2130)
SET_CS_PIN(Z);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(X2, TMC2130)
SET_CS_PIN(X2);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(Y2, TMC2130)
SET_CS_PIN(Y2);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(Z2, TMC2130)
SET_CS_PIN(Z2);
#endif
- #if ENABLED(E0_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(E0, TMC2130)
SET_CS_PIN(E0);
#endif
- #if ENABLED(E1_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(E1, TMC2130)
SET_CS_PIN(E1);
#endif
- #if ENABLED(E2_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(E2, TMC2130)
SET_CS_PIN(E2);
#endif
- #if ENABLED(E3_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(E3, TMC2130)
SET_CS_PIN(E3);
#endif
- #if ENABLED(E4_IS_TMC2130)
+ #if AXIS_DRIVER_TYPE(E4, TMC2130)
SET_CS_PIN(E4);
#endif
}
-#endif // HAVE_TMC2130
+#endif // TMC2130
#endif // HAS_TRINAMIC
diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h
index 5ddbad232978..6f11955ac543 100644
--- a/Marlin/src/feature/tmc_util.h
+++ b/Marlin/src/feature/tmc_util.h
@@ -25,11 +25,11 @@
#include "../inc/MarlinConfigPre.h"
-#if ENABLED(HAVE_TMC2130)
+#if HAS_DRIVER(TMC2130)
#include
#endif
-#if ENABLED(HAVE_TMC2208)
+#if HAS_DRIVER(TMC2208)
#include
#endif
@@ -53,7 +53,7 @@ void tmc_get_current(TMC &st, const TMC_AxisEnum axis) {
_tmc_say_current(axis, st.getCurrent());
}
template
-void tmc_set_current(TMC &st, const TMC_AxisEnum axis, const int mA) {
+void tmc_set_current(TMC &st, const int mA) {
st.setCurrent(mA, R_SENSE, HOLD_MULTIPLIER);
}
template
@@ -70,7 +70,7 @@ void tmc_get_pwmthrs(TMC &st, const TMC_AxisEnum axis, const uint16_t spmm) {
_tmc_say_pwmthrs(axis, _tmc_thrs(st.microsteps(), st.TPWMTHRS(), spmm));
}
template
-void tmc_set_pwmthrs(TMC &st, const TMC_AxisEnum axis, const int32_t thrs, const uint32_t spmm) {
+void tmc_set_pwmthrs(TMC &st, const int32_t thrs, const uint32_t spmm) {
st.TPWMTHRS(_tmc_thrs(st.microsteps(), thrs, spmm));
}
template
@@ -78,7 +78,7 @@ void tmc_get_sgt(TMC &st, const TMC_AxisEnum axis) {
_tmc_say_sgt(axis, st.sgt());
}
template
-void tmc_set_sgt(TMC &st, const TMC_AxisEnum axis, const int8_t sgt_val) {
+void tmc_set_sgt(TMC &st, const int8_t sgt_val) {
st.sgt(sgt_val);
}
@@ -97,10 +97,10 @@ void monitor_tmc_driver();
* Defined here because of limitations with templates and headers.
*/
#if ENABLED(SENSORLESS_HOMING)
- void tmc_sensorless_homing(TMC2130Stepper &st, bool enable=true);
+ void tmc_sensorless_homing(TMC2130Stepper &st, const bool enable=true);
#endif
-#if ENABLED(HAVE_TMC2130)
+#if HAS_DRIVER(TMC2130)
void tmc_init_cs_pins();
#endif
diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp
index 6f2748d3981f..cbccdee89b87 100644
--- a/Marlin/src/gcode/bedlevel/G26.cpp
+++ b/Marlin/src/gcode/bedlevel/G26.cpp
@@ -56,6 +56,10 @@
#define G26_OK false
#define G26_ERR true
+#if ENABLED(ARC_SUPPORT)
+ void plan_arc(const float (&cart)[XYZE], const float (&offset)[2], const uint8_t clockwise);
+#endif
+
/**
* G26 Mesh Validation Tool
*
@@ -131,10 +135,6 @@
// External references
-#if ENABLED(ULTRA_LCD)
- extern char lcd_status_message[];
-#endif
-
// Private functions
static uint16_t circle_flags[16], horizontal_mesh_line_flags[16], vertical_mesh_line_flags[16];
@@ -156,7 +156,7 @@ int16_t g26_bed_temp,
int8_t g26_prime_flag;
-#if ENABLED(NEWPANEL)
+#if ENABLED(ULTIPANEL)
/**
* If the LCD is clicked, cancel, wait for release, return true
@@ -219,9 +219,9 @@ mesh_index_pair find_closest_circle_to_print(const float &X, const float &Y) {
void G26_line_to_destination(const float &feed_rate) {
const float save_feedrate = feedrate_mm_s;
- feedrate_mm_s = feed_rate; // use specified feed rate
+ feedrate_mm_s = feed_rate;
prepare_move_to_destination(); // will ultimately call ubl.line_to_destination_cartesian or ubl.prepare_linear_move_to for UBL_SEGMENTED
- feedrate_mm_s = save_feedrate; // restore global feed rate
+ feedrate_mm_s = save_feedrate;
}
void move_to(const float &rx, const float &ry, const float &z, const float &e_delta) {
@@ -240,8 +240,6 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de
destination[E_AXIS] = current_position[E_AXIS];
G26_line_to_destination(feed_value);
-
- stepper.synchronize();
set_destination_from_current();
}
@@ -256,8 +254,6 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de
destination[E_AXIS] += e_delta;
G26_line_to_destination(feed_value);
-
- stepper.synchronize();
set_destination_from_current();
}
@@ -305,7 +301,7 @@ void print_line_from_here_to_there(const float &sx, const float &sy, const float
// If the end point of the line is closer to the nozzle, flip the direction,
// moving from the end to the start. On very small lines the optimization isn't worth it.
- if (dist_end < dist_start && (INTERSECTION_CIRCLE_RADIUS) < FABS(line_length))
+ if (dist_end < dist_start && (INTERSECTION_CIRCLE_RADIUS) < ABS(line_length))
return print_line_from_here_to_there(ex, ey, ez, sx, sy, sz);
// Decide whether to retract & bump
@@ -331,7 +327,7 @@ inline bool look_for_lines_to_connect() {
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
- #if ENABLED(NEWPANEL)
+ #if ENABLED(ULTIPANEL)
if (user_canceled()) return true; // Check if the user wants to stop the Mesh Validation
#endif
@@ -417,17 +413,19 @@ inline bool look_for_lines_to_connect() {
*/
inline bool turn_on_heaters() {
millis_t next = millis() + 5000UL;
- #if HAS_TEMP_BED
+ #if HAS_HEATED_BED
#if ENABLED(ULTRA_LCD)
if (g26_bed_temp > 25) {
lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
lcd_quick_feedback(true);
- lcd_external_control = true;
+ #if ENABLED(ULTIPANEL)
+ lcd_external_control = true;
+ #endif
#endif
thermalManager.setTargetBed(g26_bed_temp);
- while (abs(thermalManager.degBed() - g26_bed_temp) > 3) {
+ while (ABS(thermalManager.degBed() - g26_bed_temp) > 3) {
- #if ENABLED(NEWPANEL)
+ #if ENABLED(ULTIPANEL)
if (is_lcd_clicked()) return exit_from_g26();
#endif
@@ -448,9 +446,9 @@ inline bool turn_on_heaters() {
// Start heating the nozzle and wait for it to reach temperature.
thermalManager.setTargetHotend(g26_hotend_temp, 0);
- while (abs(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
+ while (ABS(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
- #if ENABLED(NEWPANEL)
+ #if ENABLED(ULTIPANEL)
if (is_lcd_clicked()) return exit_from_g26();
#endif
@@ -476,7 +474,7 @@ inline bool turn_on_heaters() {
*/
inline bool prime_nozzle() {
- #if ENABLED(NEWPANEL)
+ #if ENABLED(ULTIPANEL)
float Total_Prime = 0.0;
if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
@@ -497,19 +495,15 @@ inline bool prime_nozzle() {
if (Total_Prime >= EXTRUDE_MAXLENGTH) return G26_ERR;
#endif
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
-
- stepper.synchronize(); // Without this synchronize, the purge is more consistent,
+ set_destination_from_current();
+ planner.synchronize(); // Without this synchronize, the purge is more consistent,
// but because the planner has a buffer, we won't be able
// to stop as quickly. So we put up with the less smooth
// action to give the user a more responsive 'Stop'.
- set_destination_from_current();
- idle();
}
wait_for_release();
- strcpy_P(lcd_status_message, PSTR("Done Priming")); // Hack to get the message up. May be obsolete.
-
lcd_setstatusPGM(PSTR("Done Priming"), 99);
lcd_quick_feedback(true);
lcd_external_control = false;
@@ -524,7 +518,6 @@ inline bool prime_nozzle() {
set_destination_from_current();
destination[E_AXIS] += g26_prime_length;
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
- stepper.synchronize();
set_destination_from_current();
retract_filament(destination);
}
@@ -624,7 +617,7 @@ void GcodeSuite::G26() {
if (parser.seen('P')) {
if (!parser.has_value()) {
- #if ENABLED(NEWPANEL)
+ #if ENABLED(ULTIPANEL)
g26_prime_flag = -1;
#else
SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
@@ -669,7 +662,7 @@ void GcodeSuite::G26() {
}
int16_t g26_repeats;
- #if ENABLED(NEWPANEL)
+ #if ENABLED(ULTIPANEL)
g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
#else
if (!parser.seen('R')) {
@@ -698,7 +691,6 @@ void GcodeSuite::G26() {
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
- stepper.synchronize();
set_current_from_destination();
}
@@ -729,27 +721,31 @@ void GcodeSuite::G26() {
move_to(destination, 0.0);
move_to(destination, g26_ooze_amount);
- #if ENABLED(ULTRA_LCD)
+ #if ENABLED(ULTIPANEL)
lcd_external_control = true;
#endif
//debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern."));
- /**
- * Pre-generate radius offset values at 30 degree intervals to reduce CPU load.
- */
- #define A_INT 30
- #define _ANGS (360 / A_INT)
- #define A_CNT (_ANGS / 2)
- #define _IND(A) ((A + _ANGS * 8) % _ANGS)
- #define _COS(A) (trig_table[_IND(A) % A_CNT] * (_IND(A) >= A_CNT ? -1 : 1))
- #define _SIN(A) (-_COS((A + A_CNT / 2) % _ANGS))
- #if A_CNT & 1
- #error "A_CNT must be a positive value. Please change A_INT."
- #endif
- float trig_table[A_CNT];
- for (uint8_t i = 0; i < A_CNT; i++)
- trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * A_INT));
+ #if DISABLED(ARC_SUPPORT)
+
+ /**
+ * Pre-generate radius offset values at 30 degree intervals to reduce CPU load.
+ */
+ #define A_INT 30
+ #define _ANGS (360 / A_INT)
+ #define A_CNT (_ANGS / 2)
+ #define _IND(A) ((A + _ANGS * 8) % _ANGS)
+ #define _COS(A) (trig_table[_IND(A) % A_CNT] * (_IND(A) >= A_CNT ? -1 : 1))
+ #define _SIN(A) (-_COS((A + A_CNT / 2) % _ANGS))
+ #if A_CNT & 1
+ #error "A_CNT must be a positive value. Please change A_INT."
+ #endif
+ float trig_table[A_CNT];
+ for (uint8_t i = 0; i < A_CNT; i++)
+ trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * A_INT));
+
+ #endif // !ARC_SUPPORT
mesh_index_pair location;
do {
@@ -767,54 +763,128 @@ void GcodeSuite::G26() {
// Determine where to start and end the circle,
// which is always drawn counter-clockwise.
const uint8_t xi = location.x_index, yi = location.y_index;
- const bool f = yi == 0, r = xi >= GRID_MAX_POINTS_X - 1, b = yi >= GRID_MAX_POINTS_Y - 1;
- int8_t start_ind = -2, end_ind = 9; // Assume a full circle (from 5:00 to 5:00)
- if (xi == 0) { // Left edge? Just right half.
- start_ind = f ? 0 : -3; // 03:00 to 12:00 for front-left
- end_ind = b ? 0 : 2; // 06:00 to 03:00 for back-left
- }
- else if (r) { // Right edge? Just left half.
- start_ind = b ? 6 : 3; // 12:00 to 09:00 for front-right
- end_ind = f ? 5 : 8; // 09:00 to 06:00 for back-right
- }
- else if (f) { // Front edge? Just back half.
- start_ind = 0; // 03:00
- end_ind = 5; // 09:00
- }
- else if (b) { // Back edge? Just front half.
- start_ind = 6; // 09:00
- end_ind = 11; // 03:00
- }
+ const bool f = yi == 0, r = xi >= GRID_MAX_POINTS_X - 1, b = yi >= GRID_MAX_POINTS_Y - 1;
+
+ #if ENABLED(ARC_SUPPORT)
+
+ #define ARC_LENGTH(quarters) (INTERSECTION_CIRCLE_RADIUS * M_PI * (quarters) / 2)
+ float sx = circle_x + INTERSECTION_CIRCLE_RADIUS, // default to full circle
+ ex = circle_x + INTERSECTION_CIRCLE_RADIUS,
+ sy = circle_y, ey = circle_y,
+ arc_length = ARC_LENGTH(4);
+
+ // Figure out where to start and end the arc - we always print counterclockwise
+ if (xi == 0) { // left edge
+ sx = f ? circle_x + INTERSECTION_CIRCLE_RADIUS : circle_x;
+ ex = b ? circle_x + INTERSECTION_CIRCLE_RADIUS : circle_x;
+ sy = f ? circle_y : circle_y - INTERSECTION_CIRCLE_RADIUS;
+ ey = b ? circle_y : circle_y + INTERSECTION_CIRCLE_RADIUS;
+ arc_length = (f || b) ? ARC_LENGTH(1) : ARC_LENGTH(2);
+ }
+ else if (r) { // right edge
+ sx = b ? circle_x - INTERSECTION_CIRCLE_RADIUS : circle_x;
+ ex = f ? circle_x - INTERSECTION_CIRCLE_RADIUS : circle_x;
+ sy = b ? circle_y : circle_y + INTERSECTION_CIRCLE_RADIUS;
+ ey = f ? circle_y : circle_y - INTERSECTION_CIRCLE_RADIUS;
+ arc_length = (f || b) ? ARC_LENGTH(1) : ARC_LENGTH(2);
+ }
+ else if (f) {
+ sx = circle_x + INTERSECTION_CIRCLE_RADIUS;
+ ex = circle_x - INTERSECTION_CIRCLE_RADIUS;
+ sy = ey = circle_y;
+ arc_length = ARC_LENGTH(2);
+ }
+ else if (b) {
+ sx = circle_x - INTERSECTION_CIRCLE_RADIUS;
+ ex = circle_x + INTERSECTION_CIRCLE_RADIUS;
+ sy = ey = circle_y;
+ arc_length = ARC_LENGTH(2);
+ }
+ const float arc_offset[2] = {
+ circle_x - sx,
+ circle_y - sy
+ };
+
+ const float dx_s = current_position[X_AXIS] - sx, // find our distance from the start of the actual circle
+ dy_s = current_position[Y_AXIS] - sy,
+ dist_start = HYPOT2(dx_s, dy_s);
+ const float endpoint[XYZE] = {
+ ex, ey,
+ g26_layer_height,
+ current_position[E_AXIS] + (arc_length * g26_e_axis_feedrate * g26_extrusion_multiplier)
+ };
+
+ if (dist_start > 2.0) {
+ retract_filament(destination);
+ //todo: parameterize the bump height with a define
+ move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + 0.500, 0.0); // Z bump to minimize scraping
+ move_to(sx, sy, g26_layer_height + 0.500, 0.0); // Get to the starting point with no extrusion while bumped
+ }
- for (int8_t ind = start_ind; ind <= end_ind; ind++) {
+ move_to(sx, sy, g26_layer_height, 0.0); // Get to the starting point with no extrusion / un-Z bump
- #if ENABLED(NEWPANEL)
- if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
+ recover_filament(destination);
+ const float save_feedrate = feedrate_mm_s;
+ feedrate_mm_s = PLANNER_XY_FEEDRATE() / 10.0;
+ plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc
+ feedrate_mm_s = save_feedrate;
+ set_destination_from_current();
+ #if ENABLED(ULTIPANEL)
+ if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
#endif
- float rx = circle_x + _COS(ind), // For speed, these are now a lookup table entry
- ry = circle_y + _SIN(ind),
- xe = circle_x + _COS(ind + 1),
- ye = circle_y + _SIN(ind + 1);
-
- #if IS_KINEMATIC
- // Check to make sure this segment is entirely on the bed, skip if not.
- if (!position_is_reachable(rx, ry) || !position_is_reachable(xe, ye)) continue;
- #else // not, we need to skip
- rx = constrain(rx, X_MIN_POS + 1, X_MAX_POS - 1); // This keeps us from bumping the endstops
- ry = constrain(ry, Y_MIN_POS + 1, Y_MAX_POS - 1);
- xe = constrain(xe, X_MIN_POS + 1, X_MAX_POS - 1);
- ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1);
- #endif
+ #else // !ARC_SUPPORT
+ int8_t start_ind = -2, end_ind = 9; // Assume a full circle (from 5:00 to 5:00)
+ if (xi == 0) { // Left edge? Just right half.
+ start_ind = f ? 0 : -3; // 03:00 to 12:00 for front-left
+ end_ind = b ? 0 : 2; // 06:00 to 03:00 for back-left
+ }
+ else if (r) { // Right edge? Just left half.
+ start_ind = b ? 6 : 3; // 12:00 to 09:00 for front-right
+ end_ind = f ? 5 : 8; // 09:00 to 06:00 for back-right
+ }
+ else if (f) { // Front edge? Just back half.
+ start_ind = 0; // 03:00
+ end_ind = 5; // 09:00
+ }
+ else if (b) { // Back edge? Just front half.
+ start_ind = 6; // 09:00
+ end_ind = 11; // 03:00
+ }
- print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height);
- SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
- }
- if (look_for_lines_to_connect())
- goto LEAVE;
+ for (int8_t ind = start_ind; ind <= end_ind; ind++) {
+
+ #if ENABLED(ULTIPANEL)
+ if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
+ #endif
+
+ float rx = circle_x + _COS(ind), // For speed, these are now a lookup table entry
+ ry = circle_y + _SIN(ind),
+ xe = circle_x + _COS(ind + 1),
+ ye = circle_y + _SIN(ind + 1);
+
+ #if IS_KINEMATIC
+ // Check to make sure this segment is entirely on the bed, skip if not.
+ if (!position_is_reachable(rx, ry) || !position_is_reachable(xe, ye)) continue;
+ #else // not, we need to skip
+ rx = constrain(rx, X_MIN_POS + 1, X_MAX_POS - 1); // This keeps us from bumping the endstops
+ ry = constrain(ry, Y_MIN_POS + 1, Y_MAX_POS - 1);
+ xe = constrain(xe, X_MIN_POS + 1, X_MAX_POS - 1);
+ ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1);
+ #endif
+
+ print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height);
+ SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
+ }
+
+ #endif // !ARC_SUPPORT
+
+ if (look_for_lines_to_connect()) goto LEAVE;
}
+
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
+
} while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0);
LEAVE:
@@ -834,12 +904,12 @@ void GcodeSuite::G26() {
move_to(destination, 0); // Move back to the starting position
//debug_current_and_destination(PSTR("done doing X/Y move."));
- #if ENABLED(ULTRA_LCD)
+ #if ENABLED(ULTIPANEL)
lcd_external_control = false; // Give back control of the LCD Panel!
#endif
if (!g26_keep_heaters_on) {
- #if HAS_TEMP_BED
+ #if HAS_HEATED_BED
thermalManager.setTargetBed(0);
#endif
thermalManager.setTargetHotend(0, 0);
diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp
index 1af94893edee..bdf33a0a284f 100644
--- a/Marlin/src/gcode/bedlevel/M420.cpp
+++ b/Marlin/src/gcode/bedlevel/M420.cpp
@@ -32,6 +32,8 @@
#include "../../module/configuration_store.h"
#endif
+//#define M420_C_USE_MEAN
+
/**
* M420: Enable/Disable Bed Leveling and/or set the Z fade height.
*
@@ -42,8 +44,19 @@
* With AUTO_BED_LEVELING_UBL only:
*
* L[index] Load UBL mesh from index (0 is default)
+ * T[map] 0:Human-readable 1:CSV 2:"LCD" 4:Compact
+ *
+ * With mesh-based leveling only:
+ *
+ * C Center mesh on the mean of the lowest and highest
*/
void GcodeSuite::M420() {
+ const bool seen_S = parser.seen('S');
+ bool to_enable = seen_S ? parser.value_bool() : planner.leveling_active;
+
+ // If disabling leveling do it right away
+ // (Don't disable for just M420 or M420 V)
+ if (seen_S && !to_enable) set_bed_leveling_enabled(false);
const float oldpos[] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] };
@@ -52,6 +65,8 @@ void GcodeSuite::M420() {
// L to load a mesh from the EEPROM
if (parser.seen('L')) {
+ set_bed_leveling_enabled(false);
+
#if ENABLED(EEPROM_SETTINGS)
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.storage_slot;
const int16_t a = settings.calc_num_meshes();
@@ -80,13 +95,73 @@ void GcodeSuite::M420() {
// L or V display the map info
if (parser.seen('L') || parser.seen('V')) {
- ubl.display_map(0); // Currently only supports one map type
- SERIAL_ECHOLNPAIR("ubl.mesh_is_valid = ", ubl.mesh_is_valid());
- SERIAL_ECHOLNPAIR("ubl.storage_slot = ", ubl.storage_slot);
+ ubl.display_map(parser.byteval('T'));
+ SERIAL_ECHOPGM("Mesh is ");
+ if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in");
+ SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot);
}
#endif // AUTO_BED_LEVELING_UBL
+ #if HAS_MESH
+
+ #if ENABLED(MESH_BED_LEVELING)
+ #define Z_VALUES(X,Y) mbl.z_values[X][Y]
+ #else
+ #define Z_VALUES(X,Y) z_values[X][Y]
+ #endif
+
+ // Subtract the given value or the mean from all mesh values
+ if (leveling_is_valid() && parser.seen('C')) {
+ const float cval = parser.value_float();
+ #if ENABLED(AUTO_BED_LEVELING_UBL)
+
+ set_bed_leveling_enabled(false);
+ ubl.adjust_mesh_to_mean(true, cval);
+
+ #else
+
+ #if ENABLED(M420_C_USE_MEAN)
+
+ // Get the sum and average of all mesh values
+ float mesh_sum = 0;
+ for (uint8_t x = GRID_MAX_POINTS_X; x--;)
+ for (uint8_t y = GRID_MAX_POINTS_Y; y--;)
+ mesh_sum += Z_VALUES(x, y);
+ const float zmean = mesh_sum / float(GRID_MAX_POINTS);
+
+ #else
+
+ // Find the low and high mesh values
+ float lo_val = 100, hi_val = -100;
+ for (uint8_t x = GRID_MAX_POINTS_X; x--;)
+ for (uint8_t y = GRID_MAX_POINTS_Y; y--;) {
+ const float z = Z_VALUES(x, y);
+ NOMORE(lo_val, z);
+ NOLESS(hi_val, z);
+ }
+ // Take the mean of the lowest and highest
+ const float zmean = (lo_val + hi_val) / 2.0 + cval;
+
+ #endif
+
+ // If not very close to 0, adjust the mesh
+ if (!NEAR_ZERO(zmean)) {
+ set_bed_leveling_enabled(false);
+ // Subtract the mean from all values
+ for (uint8_t x = GRID_MAX_POINTS_X; x--;)
+ for (uint8_t y = GRID_MAX_POINTS_Y; y--;)
+ Z_VALUES(x, y) -= zmean;
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ bed_level_virt_interpolate();
+ #endif
+ }
+
+ #endif
+ }
+
+ #endif // HAS_MESH
+
// V to print the matrix or mesh
if (parser.seen('V')) {
#if ABL_PLANAR
@@ -110,21 +185,17 @@ void GcodeSuite::M420() {
if (parser.seen('Z')) set_z_fade_height(parser.value_linear_units(), false);
#endif
- bool to_enable = false;
- if (parser.seen('S')) {
- to_enable = parser.value_bool();
- set_bed_leveling_enabled(to_enable);
- }
-
- const bool new_status = planner.leveling_active;
+ // Enable leveling if specified, or if previously active
+ set_bed_leveling_enabled(to_enable);
- if (to_enable && !new_status) {
+ // Error if leveling failed to enable or reenable
+ if (to_enable && !planner.leveling_active) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_M420_FAILED);
}
SERIAL_ECHO_START();
- SERIAL_ECHOLNPAIR("Bed Leveling ", new_status ? MSG_ON : MSG_OFF);
+ SERIAL_ECHOLNPAIR("Bed Leveling ", planner.leveling_active ? MSG_ON : MSG_OFF);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHO_START();
@@ -140,4 +211,4 @@ void GcodeSuite::M420() {
report_current_position();
}
-#endif // HAS_LEVELING
\ No newline at end of file
+#endif // HAS_LEVELING
diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp
index 66d17e1f3520..c711b9deed54 100644
--- a/Marlin/src/gcode/bedlevel/abl/G29.cpp
+++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp
@@ -44,6 +44,10 @@
#include "../../../libs/least_squares_fit.h"
#endif
+#if ABL_PLANAR
+ #include "../../../libs/vector_3.h"
+#endif
+
#if ABL_GRID
#if ENABLED(PROBE_Y_FIRST)
#define PR_OUTER_VAR xCount
@@ -58,12 +62,20 @@
#endif
#endif
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_RETURN(b) return b;
+#else
+ #define G29_RETURN(b) return;
+#endif
+
/**
* G29: Detailed Z probe, probes the bed at 3 or more points.
* Will fail if the printer has not been homed with G28.
*
* Enhanced G29 Auto Bed Leveling Probe Routine
*
+ * O Auto-level only if needed
+ *
* D Dry-Run mode. Just evaluate the bed Topology - Don't apply
* or alter the bed level data. Useful to check the topology
* after a first run of G29.
@@ -130,7 +142,7 @@
* There's no extra effect if you have a fixed Z probe.
*
*/
-void GcodeSuite::G29() {
+G29_TYPE GcodeSuite::G29() {
#if ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(PROBE_MANUALLY)
const bool seenQ = parser.seen('Q');
@@ -148,7 +160,7 @@ void GcodeSuite::G29() {
}
marlin_debug_flags = old_debug_flags;
#if DISABLED(PROBE_MANUALLY)
- if (seenQ) return;
+ if (seenQ) G29_RETURN(false);
#endif
#endif
@@ -168,7 +180,17 @@ void GcodeSuite::G29() {
;
// Don't allow auto-leveling without homing first
- if (axis_unhomed_error()) return;
+ if (axis_unhomed_error()) G29_RETURN(false);
+
+ if (!no_action && planner.leveling_active && parser.boolval('O')) { // Auto-level only if needed
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ SERIAL_ECHOLNPGM("> Auto-level not needed, skip");
+ SERIAL_ECHOLNPGM("<<< G29");
+ }
+ #endif
+ G29_RETURN(false);
+ }
// Define local vars 'static' for manual probing, 'auto' otherwise
#if ENABLED(PROBE_MANUALLY)
@@ -252,6 +274,10 @@ void GcodeSuite::G29() {
*/
if (!g29_in_progress) {
+ #if ENABLED(DUAL_X_CARRIAGE)
+ if (active_extruder != 0) tool_change(0);
+ #endif
+
#if ENABLED(PROBE_MANUALLY) || ENABLED(AUTO_BED_LEVELING_LINEAR)
abl_probe_index = -1;
#endif
@@ -265,14 +291,14 @@ void GcodeSuite::G29() {
if (!leveling_is_valid()) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM("No bilinear grid");
- return;
+ G29_RETURN(false);
}
const float rz = parser.seenval('Z') ? RAW_Z_POSITION(parser.value_linear_units()) : current_position[Z_AXIS];
if (!WITHIN(rz, -10, 10)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM("Bad Z value");
- return;
+ G29_RETURN(false);
}
const float rx = RAW_X_POSITION(parser.linearval('X', NAN)),
@@ -296,7 +322,7 @@ void GcodeSuite::G29() {
set_bed_leveling_enabled(abl_should_enable);
if (abl_should_enable) report_current_position();
}
- return;
+ G29_RETURN(false);
} // parser.seen('W')
#else
@@ -308,13 +334,13 @@ void GcodeSuite::G29() {
// Jettison bed leveling data
if (!seen_w && parser.seen('J')) {
reset_bed_level();
- return;
+ G29_RETURN(false);
}
verbose_level = parser.intval('V');
if (!WITHIN(verbose_level, 0, 4)) {
SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0-4).");
- return;
+ G29_RETURN(false);
}
dryrun = parser.boolval('D')
@@ -335,11 +361,11 @@ void GcodeSuite::G29() {
if (!WITHIN(abl_grid_points_x, 2, GRID_MAX_POINTS_X)) {
SERIAL_PROTOCOLLNPGM("?Probe points (X) is implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ").");
- return;
+ G29_RETURN(false);
}
if (!WITHIN(abl_grid_points_y, 2, GRID_MAX_POINTS_Y)) {
SERIAL_PROTOCOLLNPGM("?Probe points (Y) is implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ").");
- return;
+ G29_RETURN(false);
}
abl_points = abl_grid_points_x * abl_grid_points_y;
@@ -360,10 +386,19 @@ void GcodeSuite::G29() {
front_probe_bed_position = parser.seenval('F') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : FRONT_PROBE_BED_POSITION;
back_probe_bed_position = parser.seenval('B') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : BACK_PROBE_BED_POSITION;
- if ( !position_is_reachable_by_probe(left_probe_bed_position, front_probe_bed_position)
- || !position_is_reachable_by_probe(right_probe_bed_position, back_probe_bed_position)) {
+ if (
+ #if IS_SCARA || ENABLED(DELTA)
+ !position_is_reachable_by_probe(left_probe_bed_position, 0)
+ || !position_is_reachable_by_probe(right_probe_bed_position, 0)
+ || !position_is_reachable_by_probe(0, front_probe_bed_position)
+ || !position_is_reachable_by_probe(0, back_probe_bed_position)
+ #else
+ !position_is_reachable_by_probe(left_probe_bed_position, front_probe_bed_position)
+ || !position_is_reachable_by_probe(right_probe_bed_position, back_probe_bed_position)
+ #endif
+ ) {
SERIAL_PROTOCOLLNPGM("? (L,R,F,B) out of bounds.");
- return;
+ G29_RETURN(false);
}
// probe at the points of a lattice grid
@@ -378,7 +413,7 @@ void GcodeSuite::G29() {
SERIAL_EOL();
}
- stepper.synchronize();
+ planner.synchronize();
// Disable auto bed leveling during G29.
// Be formal so G29 can be done successively without G28.
@@ -388,7 +423,7 @@ void GcodeSuite::G29() {
// Deploy the probe. Probe will raise if needed.
if (DEPLOY_PROBE()) {
set_bed_leveling_enabled(abl_should_enable);
- return;
+ G29_RETURN(false);
}
#endif
@@ -458,20 +493,22 @@ void GcodeSuite::G29() {
if (verbose_level || seenQ) {
SERIAL_PROTOCOLPGM("Manual G29 ");
if (g29_in_progress) {
- SERIAL_PROTOCOLPAIR("point ", min(abl_probe_index + 1, abl_points));
+ SERIAL_PROTOCOLPAIR("point ", MIN(abl_probe_index + 1, abl_points));
SERIAL_PROTOCOLLNPAIR(" of ", abl_points);
}
else
SERIAL_PROTOCOLLNPGM("idle");
}
- if (no_action) return;
+ if (no_action) G29_RETURN(false);
if (abl_probe_index == 0) {
- // For the initial G29 save software endstop state
+ // For the initial G29 S2 save software endstop state
#if HAS_SOFTWARE_ENDSTOPS
enable_soft_endstops = soft_endstops_enabled;
#endif
+ // Move close to the bed before the first point
+ do_blocking_move_to_z(0);
}
else {
@@ -553,7 +590,7 @@ void GcodeSuite::G29() {
// If G29 is not completed, they will not be re-enabled
soft_endstops_enabled = false;
#endif
- return;
+ G29_RETURN(false);
}
else {
@@ -579,7 +616,7 @@ void GcodeSuite::G29() {
// If G29 is not completed, they will not be re-enabled
soft_endstops_enabled = false;
#endif
- return;
+ G29_RETURN(false);
}
else {
@@ -934,8 +971,8 @@ void GcodeSuite::G29() {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
#endif
+ planner.synchronize();
enqueue_and_echo_commands_P(PSTR(Z_PROBE_END_SCRIPT));
- stepper.synchronize();
#endif
// Auto Bed Leveling is complete! Enable if possible.
@@ -954,11 +991,13 @@ void GcodeSuite::G29() {
if (planner.leveling_active)
SYNC_PLAN_POSITION_KINEMATIC();
- #if HAS_BED_PROBE && Z_AFTER_PROBING
+ #if HAS_BED_PROBE && defined(Z_AFTER_PROBING)
move_z_after_probing();
#endif
report_current_position();
+
+ G29_RETURN(isnan(measured_z));
}
#endif // OLDSCHOOL_ABL
diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp
index 87dcb5659f94..8c970e89b0c4 100644
--- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp
+++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp
@@ -69,7 +69,7 @@ void GcodeSuite::G29() {
static bool enable_soft_endstops;
#endif
- const MeshLevelingState state = (MeshLevelingState)parser.byteval('S', (int8_t)MeshReport);
+ MeshLevelingState state = (MeshLevelingState)parser.byteval('S', (int8_t)MeshReport);
if (!WITHIN(state, 0, 5)) {
SERIAL_PROTOCOLLNPGM("S out of range (0-5).");
return;
@@ -90,8 +90,11 @@ void GcodeSuite::G29() {
case MeshStart:
mbl.reset();
mbl_probe_index = 0;
- enqueue_and_echo_commands_P(lcd_wait_for_move ? PSTR("G29 S2") : PSTR("G28\nG29 S2"));
- break;
+ if (!lcd_wait_for_move) {
+ enqueue_and_echo_commands_P(PSTR("G28\nG29 S2"));
+ return;
+ }
+ state = MeshNext;
case MeshNext:
if (mbl_probe_index < 0) {
@@ -104,9 +107,11 @@ void GcodeSuite::G29() {
// For the initial G29 S2 save software endstop state
enable_soft_endstops = soft_endstops_enabled;
#endif
+ // Move close to the bed before the first point
+ do_blocking_move_to_z(0);
}
else {
- // For G29 S2 after adjusting Z.
+ // Save Z for the previous mesh position
mbl.set_zigzag_z(mbl_probe_index - 1, current_position[Z_AXIS]);
#if HAS_SOFTWARE_ENDSTOPS
soft_endstops_enabled = enable_soft_endstops;
@@ -114,22 +119,20 @@ void GcodeSuite::G29() {
}
// If there's another point to sample, move there with optional lift.
if (mbl_probe_index < GRID_MAX_POINTS) {
- mbl.zigzag(mbl_probe_index, px, py);
- _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
-
#if HAS_SOFTWARE_ENDSTOPS
// Disable software endstops to allow manual adjustment
// If G29 is not completed, they will not be re-enabled
soft_endstops_enabled = false;
#endif
- mbl_probe_index++;
+ mbl.zigzag(mbl_probe_index++, px, py);
+ _manual_goto_xy(mbl.index_to_xpos[px], mbl.index_to_ypos[py]);
}
else {
// One last "return to the bed" (as originally coded) at completion
- current_position[Z_AXIS] = Z_MIN_POS + MANUAL_PROBE_HEIGHT;
+ current_position[Z_AXIS] = MANUAL_PROBE_HEIGHT;
line_to_current_position();
- stepper.synchronize();
+ planner.synchronize();
// After recording the last point, activate home and activate
mbl_probe_index = -1;
@@ -141,10 +144,10 @@ void GcodeSuite::G29() {
set_bed_leveling_enabled(true);
#if ENABLED(MESH_G28_REST_ORIGIN)
- current_position[Z_AXIS] = Z_MIN_POS;
+ current_position[Z_AXIS] = 0;
set_destination_from_current();
buffer_line_to_destination(homing_feedrate(Z_AXIS));
- stepper.synchronize();
+ planner.synchronize();
#endif
#if ENABLED(LCD_BED_LEVELING)
@@ -201,8 +204,8 @@ void GcodeSuite::G29() {
} // switch(state)
- if (state == MeshStart || state == MeshNext) {
- SERIAL_PROTOCOLPAIR("MBL G29 point ", min(mbl_probe_index, GRID_MAX_POINTS));
+ if (state == MeshNext) {
+ SERIAL_PROTOCOLPAIR("MBL G29 point ", MIN(mbl_probe_index, GRID_MAX_POINTS));
SERIAL_PROTOCOLLNPAIR(" of ", int(GRID_MAX_POINTS));
}
diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp
index 72a9aa9039c0..e8597eee22cd 100644
--- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp
+++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp
@@ -37,6 +37,7 @@
* Usage:
* M421 I J Z
* M421 I J Q
+ * M421 I J N
* M421 C Z
* M421 C Q
*/
@@ -45,6 +46,7 @@ void GcodeSuite::M421() {
const bool hasI = ix >= 0,
hasJ = iy >= 0,
hasC = parser.seen('C'),
+ hasN = parser.seen('N'),
hasZ = parser.seen('Z'),
hasQ = !hasZ && parser.seen('Q');
@@ -54,7 +56,7 @@ void GcodeSuite::M421() {
iy = location.y_index;
}
- if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ)) {
+ if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS);
}
@@ -63,7 +65,7 @@ void GcodeSuite::M421() {
SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY);
}
else
- ubl.z_values[ix][iy] = parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0);
+ ubl.z_values[ix][iy] = hasN ? NAN : parser.value_linear_units() + (hasQ ? ubl.z_values[ix][iy] : 0);
}
#endif // AUTO_BED_LEVELING_UBL
diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp
index 0416ad6d41f7..c512edde0c1d 100644
--- a/Marlin/src/gcode/calibrate/G28.cpp
+++ b/Marlin/src/gcode/calibrate/G28.cpp
@@ -39,7 +39,7 @@
#include "../../feature/tmc_util.h"
#endif
-#if HOMING_Z_WITH_PROBE
+#if HOMING_Z_WITH_PROBE || ENABLED(BLTOUCH)
#include "../../module/probe.h"
#endif
@@ -64,7 +64,7 @@
const float mlx = max_length(X_AXIS),
mly = max_length(Y_AXIS),
mlratio = mlx > mly ? mly / mlx : mlx / mly,
- fr_mm_s = min(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * SQRT(sq(mlratio) + 1.0);
+ fr_mm_s = MIN(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * SQRT(sq(mlratio) + 1.0);
#if ENABLED(SENSORLESS_HOMING)
sensorless_homing_per_axis(X_AXIS);
@@ -72,7 +72,9 @@
#endif
do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s);
- endstops.hit_on_purpose(); // clear endstop hit flags
+
+ endstops.validate_homing_move();
+
current_position[X_AXIS] = current_position[Y_AXIS] = 0.0;
#if ENABLED(SENSORLESS_HOMING)
@@ -88,7 +90,7 @@
inline void home_z_safely() {
// Disallow Z homing if X or Y are unknown
- if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
+ if (!TEST(axis_known_position, X_AXIS) || !TEST(axis_known_position, Y_AXIS)) {
LCD_MESSAGEPGM(MSG_ERR_Z_HOMING);
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_ERR_Z_HOMING);
@@ -129,7 +131,7 @@
#endif
do_blocking_move_to_xy(destination[X_AXIS], destination[Y_AXIS]);
- HOMEAXIS(Z);
+ homeaxis(Z_AXIS);
}
else {
LCD_MESSAGEPGM(MSG_ZPROBE_OUT);
@@ -152,7 +154,11 @@
* None Home to all axes with no parameters.
* With QUICK_HOME enabled XY will home together, then Z.
*
- * Cartesian parameters
+ * O Home only if position is unknown
+ *
+ * Rn Raise by n mm/inches before homing
+ *
+ * Cartesian/SCARA parameters
*
* X Home to the X endstop
* Y Home to the Y endstop
@@ -168,8 +174,31 @@ void GcodeSuite::G28(const bool always_home_all) {
}
#endif
+ #if ENABLED(MARLIN_DEV_MODE)
+ if (parser.seen('S')) {
+ LOOP_XYZ(a) set_axis_is_at_home((AxisEnum)a);
+ SYNC_PLAN_POSITION_KINEMATIC();
+ SERIAL_ECHOLNPGM("Simulated Homing");
+ report_current_position();
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G28");
+ #endif
+ return;
+ }
+ #endif
+
+ if (all_axes_known() && parser.boolval('O')) { // home only if needed
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
+ if (DEBUGGING(LEVELING)) {
+ SERIAL_ECHOLNPGM("> homing not needed, skip");
+ SERIAL_ECHOLNPGM("<<< G28");
+ }
+ #endif
+ return;
+ }
+
// Wait for planner moves to finish!
- stepper.synchronize();
+ planner.synchronize();
// Cancel the active G29 session
#if ENABLED(PROBE_MANUALLY)
@@ -188,6 +217,10 @@ void GcodeSuite::G28(const bool always_home_all) {
workspace_plane = PLANE_XY;
#endif
+ #if ENABLED(BLTOUCH)
+ bltouch_init();
+ #endif
+
// Always home with tool 0 active
#if HOTENDS > 1
#if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)
@@ -222,15 +255,16 @@ void GcodeSuite::G28(const bool always_home_all) {
#if Z_HOME_DIR > 0 // If homing away from BED do Z first
- if (home_all || homeZ) HOMEAXIS(Z);
+ if (home_all || homeZ) homeaxis(Z_AXIS);
#endif
- #if ENABLED(UNKNOWN_Z_NO_RAISE)
- const float z_homing_height = axis_known_position[Z_AXIS] ? Z_HOMING_HEIGHT : 0;
- #else
- constexpr float z_homing_height = Z_HOMING_HEIGHT;
- #endif
+ const float z_homing_height = (
+ #if ENABLED(UNKNOWN_Z_NO_RAISE)
+ !TEST(axis_known_position, Z_AXIS) ? 0 :
+ #endif
+ (parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT)
+ );
if (z_homing_height && (home_all || homeX || homeY)) {
// Raise Z before homing any other axes and z is not already high enough (never lower z)
@@ -259,7 +293,7 @@ void GcodeSuite::G28(const bool always_home_all) {
#if ENABLED(CODEPENDENT_XY_HOMING)
|| homeX
#endif
- ) HOMEAXIS(Y);
+ ) homeaxis(Y_AXIS);
#endif
@@ -274,14 +308,14 @@ void GcodeSuite::G28(const bool always_home_all) {
// Always home the 2nd (right) extruder first
active_extruder = 1;
- HOMEAXIS(X);
+ homeaxis(X_AXIS);
// Remember this extruder's position for later tool change
inactive_extruder_x_pos = current_position[X_AXIS];
// Home the 1st (left) extruder
active_extruder = 0;
- HOMEAXIS(X);
+ homeaxis(X_AXIS);
// Consider the active extruder to be parked
COPY(raised_parked_position, current_position);
@@ -290,14 +324,14 @@ void GcodeSuite::G28(const bool always_home_all) {
#else
- HOMEAXIS(X);
+ homeaxis(X_AXIS);
#endif
}
// Home Y (after X)
#if DISABLED(HOME_Y_BEFORE_X)
- if (home_all || homeY) HOMEAXIS(Y);
+ if (home_all || homeY) homeaxis(Y_AXIS);
#endif
// Home Z last if homing towards the bed
@@ -306,12 +340,14 @@ void GcodeSuite::G28(const bool always_home_all) {
#if ENABLED(Z_SAFE_HOMING)
home_z_safely();
#else
- HOMEAXIS(Z);
+ homeaxis(Z_AXIS);
+ #endif
+
+ #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
+ move_z_after_probing();
#endif
+
} // home_all || homeZ
- #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
- move_z_after_probing();
- #endif
#endif // Z_HOME_DIR < 0
SYNC_PLAN_POSITION_KINEMATIC();
diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp
index 72f4a01067aa..404da70d4f0b 100644
--- a/Marlin/src/gcode/calibrate/G33.cpp
+++ b/Marlin/src/gcode/calibrate/G33.cpp
@@ -26,12 +26,15 @@
#include "../gcode.h"
#include "../../module/delta.h"
-#include "../../module/probe.h"
#include "../../module/motion.h"
#include "../../module/stepper.h"
#include "../../module/endstops.h"
#include "../../lcd/ultralcd.h"
+#if HAS_BED_PROBE
+ #include "../../module/probe.h"
+#endif
+
#if HOTENDS > 1
#include "../../module/tool_change.h"
#endif
@@ -43,7 +46,7 @@
constexpr uint8_t _7P_STEP = 1, // 7-point step - to change number of calibration points
_4P_STEP = _7P_STEP * 2, // 4-point step
NPP = _7P_STEP * 6; // number of calibration points on the radius
-enum CalEnum : char { // the 7 main calibration points - add definitions if needed
+enum CalEnum : char { // the 7 main calibration points - add definitions if needed
CEN = 0,
__A = 1,
_AB = __A + _7P_STEP,
@@ -60,7 +63,52 @@ enum CalEnum : char { // the 7 main calibration po
#define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP)
#define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP)
-static void print_signed_float(const char * const prefix, const float &f) {
+#if HOTENDS > 1
+ const uint8_t old_tool_index = active_extruder;
+ #define AC_CLEANUP() ac_cleanup(old_tool_index)
+#else
+ #define AC_CLEANUP() ac_cleanup()
+#endif
+
+float lcd_probe_pt(const float &rx, const float &ry);
+
+void ac_home() {
+ endstops.enable(true);
+ home_delta();
+ endstops.not_homing();
+}
+
+void ac_setup(const bool reset_bed) {
+ #if HOTENDS > 1
+ tool_change(0, 0, true);
+ #endif
+
+ planner.synchronize();
+ setup_for_endstop_or_probe_move();
+
+ #if HAS_LEVELING
+ if (reset_bed) reset_bed_level(); // After full calibration bed-level data is no longer valid
+ #endif
+}
+
+void ac_cleanup(
+ #if HOTENDS > 1
+ const uint8_t old_tool_index
+ #endif
+) {
+ #if ENABLED(DELTA_HOME_TO_SAFE_ZONE)
+ do_blocking_move_to_z(delta_clip_start_height);
+ #endif
+ #if HAS_BED_PROBE
+ STOW_PROBE();
+ #endif
+ clean_up_after_endstop_or_probe_move();
+ #if HOTENDS > 1
+ tool_change(old_tool_index, 0, true);
+ #endif
+}
+
+void print_signed_float(const char * const prefix, const float &f) {
SERIAL_PROTOCOLPGM(" ");
serialprintPGM(prefix);
SERIAL_PROTOCOLCHAR(':');
@@ -68,7 +116,10 @@ static void print_signed_float(const char * const prefix, const float &f) {
SERIAL_PROTOCOL_F(f, 2);
}
-static void print_G33_settings(const bool end_stops, const bool tower_angles) {
+/**
+ * - Print the delta settings
+ */
+static void print_calibration_settings(const bool end_stops, const bool tower_angles) {
SERIAL_PROTOCOLPAIR(".Height:", delta_height);
if (end_stops) {
print_signed_float(PSTR("Ex"), delta_endstop_adj[A_AXIS]);
@@ -89,16 +140,25 @@ static void print_G33_settings(const bool end_stops, const bool tower_angles) {
if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR
SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
}
+ #if HAS_BED_PROBE
+ if (!end_stops && !tower_angles) {
+ SERIAL_PROTOCOL_SP(30);
+ print_signed_float(PSTR("Offset"), zprobe_zoffset);
+ }
+ #endif
SERIAL_EOL();
}
-static void print_G33_results(const float z_at_pt[NPP + 1], const bool tower_points, const bool opposite_points) {
+/**
+ * - Print the probe results
+ */
+static void print_calibration_results(const float z_pt[NPP + 1], const bool tower_points, const bool opposite_points) {
SERIAL_PROTOCOLPGM(". ");
- print_signed_float(PSTR("c"), z_at_pt[CEN]);
+ print_signed_float(PSTR("c"), z_pt[CEN]);
if (tower_points) {
- print_signed_float(PSTR(" x"), z_at_pt[__A]);
- print_signed_float(PSTR(" y"), z_at_pt[__B]);
- print_signed_float(PSTR(" z"), z_at_pt[__C]);
+ print_signed_float(PSTR(" x"), z_pt[__A]);
+ print_signed_float(PSTR(" y"), z_pt[__B]);
+ print_signed_float(PSTR(" z"), z_pt[__C]);
}
if (tower_points && opposite_points) {
SERIAL_EOL();
@@ -106,50 +166,63 @@ static void print_G33_results(const float z_at_pt[NPP + 1], const bool tower_poi
SERIAL_PROTOCOL_SP(13);
}
if (opposite_points) {
- print_signed_float(PSTR("yz"), z_at_pt[_BC]);
- print_signed_float(PSTR("zx"), z_at_pt[_CA]);
- print_signed_float(PSTR("xy"), z_at_pt[_AB]);
+ print_signed_float(PSTR("yz"), z_pt[_BC]);
+ print_signed_float(PSTR("zx"), z_pt[_CA]);
+ print_signed_float(PSTR("xy"), z_pt[_AB]);
}
SERIAL_EOL();
}
/**
- * After G33:
- * - Move to the print ceiling (DELTA_HOME_TO_SAFE_ZONE only)
- * - Stow the probe
- * - Restore endstops state
- * - Select the old tool, if needed
+ * - Calculate the standard deviation from the zero plane
*/
-static void G33_cleanup(
- #if HOTENDS > 1
- const uint8_t old_tool_index
- #endif
-) {
- #if ENABLED(DELTA_HOME_TO_SAFE_ZONE)
- do_blocking_move_to_z(delta_clip_start_height);
- #endif
- STOW_PROBE();
- clean_up_after_endstop_or_probe_move();
- #if HOTENDS > 1
- tool_change(old_tool_index, 0, true);
- #endif
+static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool _1p_cal, const bool _4p_cal, const bool _4p_opp) {
+ if (!_0p_cal) {
+ float S2 = sq(z_pt[CEN]);
+ int16_t N = 1;
+ if (!_1p_cal) { // std dev from zero plane
+ LOOP_CAL_ACT(rad, _4p_cal, _4p_opp) {
+ S2 += sq(z_pt[rad]);
+ N++;
+ }
+ return LROUND(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
+ }
+ }
+ return 0.00001;
}
-inline float calibration_probe(const float nx, const float ny, const bool stow) {
+/**
+ * - Probe a point
+ */
+static float calibration_probe(const float &nx, const float &ny, const bool stow, const bool set_up) {
#if HAS_BED_PROBE
- return probe_pt(nx, ny, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true);
+ return probe_pt(nx, ny, set_up ? PROBE_PT_BIG_RAISE : stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, false);
#else
UNUSED(stow);
+ UNUSED(set_up);
return lcd_probe_pt(nx, ny);
#endif
}
-static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each) {
+#if HAS_BED_PROBE
+ static float probe_z_shift(const float center) {
+ STOW_PROBE();
+ endstops.enable_z_probe(false);
+ float z_shift = lcd_probe_pt(0, 0) - center;
+ endstops.enable_z_probe(true);
+ return z_shift;
+ }
+#endif
+
+/**
+ * - Probe a grid
+ */
+static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each, const bool set_up) {
const bool _0p_calibration = probe_points == 0,
- _1p_calibration = probe_points == 1,
+ _1p_calibration = probe_points == 1 || probe_points == -1,
_4p_calibration = probe_points == 2,
_4p_opposite_points = _4p_calibration && !towers_set,
- _7p_calibration = probe_points >= 3 || probe_points == 0,
+ _7p_calibration = probe_points >= 3,
_7p_no_intermediates = probe_points == 3,
_7p_1_intermediates = probe_points == 4,
_7p_2_intermediates = probe_points == 5,
@@ -159,28 +232,28 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
_7p_11_intermediates = probe_points == 9,
_7p_14_intermediates = probe_points == 10,
_7p_intermed_points = probe_points >= 4,
- _7p_6_centre = probe_points >= 5 && probe_points <= 7,
- _7p_9_centre = probe_points >= 8;
+ _7p_6_center = probe_points >= 5 && probe_points <= 7,
+ _7p_9_center = probe_points >= 8;
- LOOP_CAL_ALL(axis) z_at_pt[axis] = 0.0;
+ LOOP_CAL_ALL(rad) z_pt[rad] = 0.0;
if (!_0p_calibration) {
if (!_7p_no_intermediates && !_7p_4_intermediates && !_7p_11_intermediates) { // probe the center
- z_at_pt[CEN] += calibration_probe(0, 0, stow_after_each);
- if (isnan(z_at_pt[CEN])) return NAN;
+ z_pt[CEN] += calibration_probe(0, 0, stow_after_each, set_up);
+ if (isnan(z_pt[CEN])) return false;
}
if (_7p_calibration) { // probe extra center points
- const float start = _7p_9_centre ? _CA + _7P_STEP / 3.0 : _7p_6_centre ? _CA : __C,
- steps = _7p_9_centre ? _4P_STEP / 3.0 : _7p_6_centre ? _7P_STEP : _4P_STEP;
- I_LOOP_CAL_PT(axis, start, steps) {
- const float a = RADIANS(210 + (360 / NPP) * (axis - 1)),
+ const float start = _7p_9_center ? float(_CA) + _7P_STEP / 3.0 : _7p_6_center ? float(_CA) : float(__C),
+ steps = _7p_9_center ? _4P_STEP / 3.0 : _7p_6_center ? _7P_STEP : _4P_STEP;
+ I_LOOP_CAL_PT(rad, start, steps) {
+ const float a = RADIANS(210 + (360 / NPP) * (rad - 1)),
r = delta_calibration_radius * 0.1;
- z_at_pt[CEN] += calibration_probe(cos(a) * r, sin(a) * r, stow_after_each);
- if (isnan(z_at_pt[CEN])) return NAN;
+ z_pt[CEN] += calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up);
+ if (isnan(z_pt[CEN])) return false;
}
- z_at_pt[CEN] /= float(_7p_2_intermediates ? 7 : probe_points);
+ z_pt[CEN] /= float(_7p_2_intermediates ? 7 : probe_points);
}
if (!_1p_calibration) { // probe the radius
@@ -195,182 +268,150 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
_7p_no_intermediates ? _7P_STEP : // 1r * 6 + 3c = 9
_4P_STEP; // .5r * 6 + 1c = 4
bool zig_zag = true;
- F_LOOP_CAL_PT(axis, start, _7p_9_centre ? steps * 3 : steps) {
- const int8_t offset = _7p_9_centre ? 1 : 0;
- for (int8_t circle = -offset; circle <= offset; circle++) {
- const float a = RADIANS(210 + (360 / NPP) * (axis - 1)),
- r = delta_calibration_radius * (1 + 0.1 * (zig_zag ? circle : - circle)),
- interpol = fmod(axis, 1);
- const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each);
- if (isnan(z_temp)) return NAN;
+ F_LOOP_CAL_PT(rad, start, _7p_9_center ? steps * 3 : steps) {
+ const int8_t offset = _7p_9_center ? 2 : 0;
+ for (int8_t circle = 0; circle <= offset; circle++) {
+ const float a = RADIANS(210 + (360 / NPP) * (rad - 1)),
+ r = delta_calibration_radius * (1 - 0.1 * (zig_zag ? offset - circle : circle)),
+ interpol = fmod(rad, 1);
+ const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up);
+ if (isnan(z_temp)) return false;
// split probe point to neighbouring calibration points
- z_at_pt[uint8_t(round(axis - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90)));
- z_at_pt[uint8_t(round(axis - interpol)) % NPP + 1] += z_temp * sq(sin(RADIANS(interpol * 90)));
+ z_pt[uint8_t(LROUND(rad - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90)));
+ z_pt[uint8_t(LROUND(rad - interpol)) % NPP + 1] += z_temp * sq(sin(RADIANS(interpol * 90)));
}
zig_zag = !zig_zag;
}
if (_7p_intermed_points)
- LOOP_CAL_RAD(axis)
- z_at_pt[axis] /= _7P_STEP / steps;
- }
+ LOOP_CAL_RAD(rad)
+ z_pt[rad] /= _7P_STEP / steps;
- float S1 = z_at_pt[CEN],
- S2 = sq(z_at_pt[CEN]);
- int16_t N = 1;
- if (!_1p_calibration) { // std dev from zero plane
- LOOP_CAL_ACT(axis, _4p_calibration, _4p_opposite_points) {
- S1 += z_at_pt[axis];
- S2 += sq(z_at_pt[axis]);
- N++;
- }
- return round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
+ do_blocking_move_to_xy(0.0, 0.0);
}
}
-
- return 0.00001;
+ return true;
}
-#if HAS_BED_PROBE
+/**
+ * kinematics routines and auto tune matrix scaling parameters:
+ * see https://github.com/LVD-AC/Marlin-AC/tree/1.1.x-AC/documentation for
+ * - formulae for approximative forward kinematics in the end-stop displacement matrix
+ * - definition of the matrix scaling parameters
+ */
+static void reverse_kinematics_probe_points(float z_pt[NPP + 1], float mm_at_pt_axis[NPP + 1][ABC]) {
+ float pos[XYZ] = { 0.0 };
+
+ LOOP_CAL_ALL(rad) {
+ const float a = RADIANS(210 + (360 / NPP) * (rad - 1)),
+ r = (rad == CEN ? 0.0 : delta_calibration_radius);
+ pos[X_AXIS] = cos(a) * r;
+ pos[Y_AXIS] = sin(a) * r;
+ pos[Z_AXIS] = z_pt[rad];
+ inverse_kinematics(pos);
+ LOOP_XYZ(axis) mm_at_pt_axis[rad][axis] = delta[axis];
+ }
+}
- static bool G33_auto_tune() {
- float z_at_pt[NPP + 1] = { 0.0 },
- z_at_pt_base[NPP + 1] = { 0.0 },
- z_temp, h_fac = 0.0, r_fac = 0.0, a_fac = 0.0, norm = 0.8;
+static void forward_kinematics_probe_points(float mm_at_pt_axis[NPP + 1][ABC], float z_pt[NPP + 1]) {
+ const float r_quot = delta_calibration_radius / delta_radius;
+
+ #define ZPP(N,I,A) ((1 / 3.0 + r_quot * (N) / 3.0 ) * mm_at_pt_axis[I][A])
+ #define Z00(I, A) ZPP( 0, I, A)
+ #define Zp1(I, A) ZPP(+1, I, A)
+ #define Zm1(I, A) ZPP(-1, I, A)
+ #define Zp2(I, A) ZPP(+2, I, A)
+ #define Zm2(I, A) ZPP(-2, I, A)
+
+ z_pt[CEN] = Z00(CEN, A_AXIS) + Z00(CEN, B_AXIS) + Z00(CEN, C_AXIS);
+ z_pt[__A] = Zp2(__A, A_AXIS) + Zm1(__A, B_AXIS) + Zm1(__A, C_AXIS);
+ z_pt[__B] = Zm1(__B, A_AXIS) + Zp2(__B, B_AXIS) + Zm1(__B, C_AXIS);
+ z_pt[__C] = Zm1(__C, A_AXIS) + Zm1(__C, B_AXIS) + Zp2(__C, C_AXIS);
+ z_pt[_BC] = Zm2(_BC, A_AXIS) + Zp1(_BC, B_AXIS) + Zp1(_BC, C_AXIS);
+ z_pt[_CA] = Zp1(_CA, A_AXIS) + Zm2(_CA, B_AXIS) + Zp1(_CA, C_AXIS);
+ z_pt[_AB] = Zp1(_AB, A_AXIS) + Zp1(_AB, B_AXIS) + Zm2(_AB, C_AXIS);
+}
- #define ZP(N,I) ((N) * z_at_pt[I])
- #define Z06(I) ZP(6, I)
- #define Z03(I) ZP(3, I)
- #define Z02(I) ZP(2, I)
- #define Z01(I) ZP(1, I)
- #define Z32(I) ZP(3/2, I)
+static void calc_kinematics_diff_probe_points(float z_pt[NPP + 1], float delta_e[ABC], float delta_r, float delta_t[ABC]) {
+ const float z_center = z_pt[CEN];
+ float diff_mm_at_pt_axis[NPP + 1][ABC],
+ new_mm_at_pt_axis[NPP + 1][ABC];
- SERIAL_PROTOCOLPGM("AUTO TUNE baseline");
- SERIAL_EOL();
- if (isnan(probe_G33_points(z_at_pt_base, 3, true, false))) return false;
- print_G33_results(z_at_pt_base, true, true);
+ reverse_kinematics_probe_points(z_pt, diff_mm_at_pt_axis);
- LOOP_XYZ(axis) {
- delta_endstop_adj[axis] -= 1.0;
- recalc_delta_settings();
+ delta_radius += delta_r;
+ LOOP_XYZ(axis) delta_tower_angle_trim[axis] += delta_t[axis];
+ recalc_delta_settings();
+ reverse_kinematics_probe_points(z_pt, new_mm_at_pt_axis);
- endstops.enable(true);
- if (!home_delta()) return false;
- endstops.not_homing();
+ LOOP_XYZ(axis) LOOP_CAL_ALL(rad) diff_mm_at_pt_axis[rad][axis] -= new_mm_at_pt_axis[rad][axis] + delta_e[axis];
+ forward_kinematics_probe_points(diff_mm_at_pt_axis, z_pt);
- SERIAL_PROTOCOLPGM("Tuning E");
- SERIAL_CHAR(tolower(axis_codes[axis]));
- SERIAL_EOL();
+ LOOP_CAL_RAD(rad) z_pt[rad] -= z_pt[CEN] - z_center;
+ z_pt[CEN] = z_center;
- if (isnan(probe_G33_points(z_at_pt, 3, true, false))) return false;
- LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
- print_G33_results(z_at_pt, true, true);
- delta_endstop_adj[axis] += 1.0;
- recalc_delta_settings();
- switch (axis) {
- case A_AXIS :
- h_fac += 4.0 / (Z03(CEN) +Z01(__A) +Z32(_CA) +Z32(_AB)); // Offset by X-tower end-stop
- break;
- case B_AXIS :
- h_fac += 4.0 / (Z03(CEN) +Z01(__B) +Z32(_BC) +Z32(_AB)); // Offset by Y-tower end-stop
- break;
- case C_AXIS :
- h_fac += 4.0 / (Z03(CEN) +Z01(__C) +Z32(_BC) +Z32(_CA) ); // Offset by Z-tower end-stop
- break;
- }
- }
- h_fac /= 3.0;
- h_fac *= norm; // Normalize to 1.02 for Kossel mini
-
- for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) {
- delta_radius += 1.0 * zig_zag;
- recalc_delta_settings();
-
- endstops.enable(true);
- if (!home_delta()) return false;
- endstops.not_homing();
-
- SERIAL_PROTOCOLPGM("Tuning R");
- SERIAL_PROTOCOL(zig_zag == -1 ? "-" : "+");
- SERIAL_EOL();
- if (isnan(probe_G33_points(z_at_pt, 3, true, false))) return false;
- LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
- print_G33_results(z_at_pt, true, true);
- delta_radius -= 1.0 * zig_zag;
- recalc_delta_settings();
- r_fac -= zig_zag * 6.0 / (Z03(__A) +Z03(__B) +Z03(__C) +Z03(_BC) +Z03(_CA) +Z03(_AB)); // Offset by delta radius
- }
- r_fac /= 2.0;
- r_fac *= 3 * norm; // Normalize to 2.25 for Kossel mini
-
- LOOP_XYZ(axis) {
- delta_tower_angle_trim[axis] += 1.0;
- delta_endstop_adj[(axis + 1) % 3] -= 1.0 / 4.5;
- delta_endstop_adj[(axis + 2) % 3] += 1.0 / 4.5;
- z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
- delta_height -= z_temp;
- LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
- recalc_delta_settings();
+ delta_radius -= delta_r;
+ LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= delta_t[axis];
+ recalc_delta_settings();
+}
- endstops.enable(true);
- if (!home_delta()) return false;
- endstops.not_homing();
+static float auto_tune_h() {
+ const float r_quot = delta_calibration_radius / delta_radius;
+ float h_fac = 0.0;
- SERIAL_PROTOCOLPGM("Tuning T");
- SERIAL_CHAR(tolower(axis_codes[axis]));
- SERIAL_EOL();
+ h_fac = r_quot / (2.0 / 3.0);
+ h_fac = 1.0f / h_fac; // (2/3)/CR
+ return h_fac;
+}
- if (isnan(probe_G33_points(z_at_pt, 3, true, false))) return false;
- LOOP_CAL_ALL(axis) z_at_pt[axis] -= z_at_pt_base[axis];
- print_G33_results(z_at_pt, true, true);
+static float auto_tune_r() {
+ const float diff = 0.01;
+ float r_fac = 0.0,
+ z_pt[NPP + 1] = { 0.0 },
+ delta_e[ABC] = {0.0},
+ delta_r = {0.0},
+ delta_t[ABC] = {0.0};
+
+ delta_r = diff;
+ calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
+ r_fac = -(z_pt[__A] + z_pt[__B] + z_pt[__C] + z_pt[_BC] + z_pt[_CA] + z_pt[_AB]) / 6.0;
+ r_fac = diff / r_fac / 3.0; // 1/(3*delta_Z)
+ return r_fac;
+}
- delta_tower_angle_trim[axis] -= 1.0;
- delta_endstop_adj[(axis+1) % 3] += 1.0/4.5;
- delta_endstop_adj[(axis+2) % 3] -= 1.0/4.5;
- z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
- delta_height -= z_temp;
- LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
- recalc_delta_settings();
- switch (axis) {
- case A_AXIS :
- a_fac += 4.0 / ( Z06(__B) -Z06(__C) +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
- break;
- case B_AXIS :
- a_fac += 4.0 / (-Z06(__A) +Z06(__C) -Z06(_BC) +Z06(_AB)); // Offset by beta tower angle
- break;
- case C_AXIS :
- a_fac += 4.0 / (Z06(__A) -Z06(__B) +Z06(_BC) -Z06(_CA) ); // Offset by gamma tower angle
- break;
- }
- }
- a_fac /= 3.0;
- a_fac *= norm; // Normalize to 0.83 for Kossel mini
-
- endstops.enable(true);
- if (!home_delta()) return false;
- endstops.not_homing();
- print_signed_float(PSTR( "H_FACTOR: "), h_fac);
- print_signed_float(PSTR(" R_FACTOR: "), r_fac);
- print_signed_float(PSTR(" A_FACTOR: "), a_fac);
- SERIAL_EOL();
- SERIAL_PROTOCOLPGM("Copy these values to Configuration.h");
- SERIAL_EOL();
- return true;
+static float auto_tune_a() {
+ const float diff = 0.01;
+ float a_fac = 0.0,
+ z_pt[NPP + 1] = { 0.0 },
+ delta_e[ABC] = {0.0},
+ delta_r = {0.0},
+ delta_t[ABC] = {0.0};
+
+ LOOP_XYZ(axis) {
+ LOOP_XYZ(axis_2) delta_t[axis_2] = 0.0;
+ delta_t[axis] = diff;
+ calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t);
+ a_fac += z_pt[uint8_t((axis * _4P_STEP) - _7P_STEP + NPP) % NPP + 1] / 6.0;
+ a_fac -= z_pt[uint8_t((axis * _4P_STEP) + 1 + _7P_STEP)] / 6.0;
}
-
-#endif // HAS_BED_PROBE
+ a_fac = diff / a_fac / 3.0; // 1/(3*delta_Z)
+ return a_fac;
+}
/**
* G33 - Delta '1-4-7-point' Auto-Calibration
- * Calibrate height, endstops, delta radius, and tower angles.
+ * Calibrate height, z_offset, endstops, delta radius, and tower angles.
*
* Parameters:
*
+ * S Setup mode; disables probe protection
+ *
* Pn Number of probe points:
- * P0 No probe. Normalize only.
- * P1 Probe center and set height only.
- * P2 Probe center and towers. Set height, endstops and delta radius.
- * P3 Probe all positions: center, towers and opposite towers. Set all.
- * P4-P10 Probe all positions + at different intermediate locations and average them.
+ * P-1 Checks the z_offset with a center probe and paper test.
+ * P0 Normalizes calibration.
+ * P1 Calibrates height only with center probe.
+ * P2 Probe center and towers. Calibrate height, endstops and delta radius.
+ * P3 Probe all positions: center, towers and opposite towers. Calibrate all.
+ * P4-P10 Probe all positions at different intermediate locations and average them.
*
* T Don't calibrate tower angle corrections
*
@@ -378,8 +419,6 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
*
* Fn Force to run at least n iterations and take the best result
*
- * A Auto-tune calibration factors (set in Configuration.h)
- *
* Vn Verbose level:
* V0 Dry-run mode. Report settings and probe results. No calibration.
* V1 Report start and end settings only
@@ -390,19 +429,22 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
*/
void GcodeSuite::G33() {
- const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
- if (!WITHIN(probe_points, 0, 10)) {
- SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (0-10).");
- return;
- }
+ const bool set_up =
+ #if HAS_BED_PROBE
+ parser.seen('S');
+ #else
+ false;
+ #endif
- const int8_t verbose_level = parser.byteval('V', 1);
- if (!WITHIN(verbose_level, 0, 3)) {
- SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0-3).");
+ const int8_t probe_points = set_up ? 2 : parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
+ if (!WITHIN(probe_points, -1, 10)) {
+ SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (-1 - 10).");
return;
}
- const float calibration_precision = parser.floatval('C', 0.0);
+ const bool towers_set = !parser.seen('T');
+
+ const float calibration_precision = set_up ? Z_CLEARANCE_BETWEEN_PROBES / 5.0 : parser.floatval('C', 0.0);
if (calibration_precision < 0) {
SERIAL_PROTOCOLLNPGM("?(C)alibration precision is implausible (>=0).");
return;
@@ -410,36 +452,52 @@ void GcodeSuite::G33() {
const int8_t force_iterations = parser.intval('F', 0);
if (!WITHIN(force_iterations, 0, 30)) {
- SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0-30).");
+ SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0 - 30).");
+ return;
+ }
+
+ const int8_t verbose_level = parser.byteval('V', 1);
+ if (!WITHIN(verbose_level, 0, 3)) {
+ SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0 - 3).");
return;
}
- const bool towers_set = !parser.boolval('T'),
- auto_tune = parser.boolval('A'),
- stow_after_each = parser.boolval('E'),
- _0p_calibration = probe_points == 0,
- _1p_calibration = probe_points == 1,
+ const bool stow_after_each = parser.seen('E');
+
+ if (set_up) {
+ delta_height = 999.99;
+ delta_radius = DELTA_PRINTABLE_RADIUS;
+ ZERO(delta_endstop_adj);
+ ZERO(delta_tower_angle_trim);
+ recalc_delta_settings();
+ }
+
+ const bool _0p_calibration = probe_points == 0,
+ _1p_calibration = probe_points == 1 || probe_points == -1,
_4p_calibration = probe_points == 2,
- _7p_9_centre = probe_points >= 8,
- _tower_results = (_4p_calibration && towers_set)
- || probe_points >= 3 || probe_points == 0,
- _opposite_results = (_4p_calibration && !towers_set)
- || probe_points >= 3 || probe_points == 0,
- _endstop_results = probe_points != 1,
- _angle_results = (probe_points >= 3 || probe_points == 0) && towers_set;
- const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
+ _4p_opposite_points = _4p_calibration && !towers_set,
+ _7p_9_center = probe_points >= 8,
+ _tower_results = (_4p_calibration && towers_set) || probe_points >= 3,
+ _opposite_results = (_4p_calibration && !towers_set) || probe_points >= 3,
+ _endstop_results = probe_points != 1 && probe_points != -1 && probe_points != 0,
+ _angle_results = probe_points >= 3 && towers_set;
+ static const char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
int8_t iterations = 0;
float test_precision,
zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
zero_std_dev_min = zero_std_dev,
+ zero_std_dev_old = zero_std_dev,
+ h_factor,
+ r_factor,
+ a_factor,
e_old[ABC] = {
delta_endstop_adj[A_AXIS],
delta_endstop_adj[B_AXIS],
delta_endstop_adj[C_AXIS]
},
- dr_old = delta_radius,
- zh_old = delta_height,
- ta_old[ABC] = {
+ r_old = delta_radius,
+ h_old = delta_height,
+ a_old[ABC] = {
delta_tower_angle_trim[A_AXIS],
delta_tower_angle_trim[B_AXIS],
delta_tower_angle_trim[C_AXIS]
@@ -447,10 +505,10 @@ void GcodeSuite::G33() {
SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate");
- if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable
+ if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable
LOOP_CAL_RAD(axis) {
const float a = RADIANS(210 + (360 / NPP) * (axis - 1)),
- r = delta_calibration_radius * (1 + (_7p_9_centre ? 0.1 : 0.0));
+ r = delta_calibration_radius;
if (!position_is_reachable(cos(a) * r, sin(a) * r)) {
SERIAL_PROTOCOLLNPGM("?(M665 B)ed radius is implausible.");
return;
@@ -458,159 +516,133 @@ void GcodeSuite::G33() {
}
}
- stepper.synchronize();
- #if HAS_LEVELING
- reset_bed_level(); // After calibration bed-level data is no longer valid
- #endif
-
- #if HOTENDS > 1
- const uint8_t old_tool_index = active_extruder;
- tool_change(0, 0, true);
- #define G33_CLEANUP() G33_cleanup(old_tool_index)
- #else
- #define G33_CLEANUP() G33_cleanup()
- #endif
-
- setup_for_endstop_or_probe_move();
- endstops.enable(true);
- if (!_0p_calibration) {
- if (!home_delta())
- return;
- endstops.not_homing();
- }
-
- if (auto_tune) {
- #if HAS_BED_PROBE
- G33_auto_tune();
- #else
- SERIAL_PROTOCOLLNPGM("A probe is needed for auto-tune");
- #endif
- G33_CLEANUP();
- return;
- }
-
// Report settings
-
- PGM_P checkingac = PSTR("Checking... AC"); // TODO: Make translatable string
+ const char* checkingac = PSTR("Checking... AC");
serialprintPGM(checkingac);
if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)");
+ if (set_up) SERIAL_PROTOCOLPGM(" (SET-UP)");
SERIAL_EOL();
lcd_setstatusPGM(checkingac);
- print_G33_settings(_endstop_results, _angle_results);
+ print_calibration_settings(_endstop_results, _angle_results);
- do {
+ ac_setup(!_0p_calibration && !_1p_calibration);
- float z_at_pt[NPP + 1] = { 0.0 };
+ if (!_0p_calibration) ac_home();
+
+ do { // start iterations
- test_precision = zero_std_dev;
+ float z_at_pt[NPP + 1] = { 0.0 };
+ test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
iterations++;
// Probe the points
-
- zero_std_dev = probe_G33_points(z_at_pt, probe_points, towers_set, stow_after_each);
- if (isnan(zero_std_dev)) {
- SERIAL_PROTOCOLPGM("Correct delta_radius with M665 R or end-stops with M666 X Y Z");
- SERIAL_EOL();
- return G33_CLEANUP();
+ zero_std_dev_old = zero_std_dev;
+ if (!probe_calibration_points(z_at_pt, probe_points, towers_set, stow_after_each, set_up)) {
+ SERIAL_PROTOCOLLNPGM("Correct delta settings with M665 and M666");
+ return AC_CLEANUP();
}
+ zero_std_dev = std_dev_points(z_at_pt, _0p_calibration, _1p_calibration, _4p_calibration, _4p_opposite_points);
// Solve matrices
if ((zero_std_dev < test_precision || iterations <= force_iterations) && zero_std_dev > calibration_precision) {
+
+ #if !HAS_BED_PROBE
+ test_precision = 0.00; // forced end
+ #endif
+
if (zero_std_dev < zero_std_dev_min) {
+ // set roll-back point
COPY(e_old, delta_endstop_adj);
- dr_old = delta_radius;
- zh_old = delta_height;
- COPY(ta_old, delta_tower_angle_trim);
+ r_old = delta_radius;
+ h_old = delta_height;
+ COPY(a_old, delta_tower_angle_trim);
}
- float e_delta[ABC] = { 0.0 }, r_delta = 0.0, t_delta[ABC] = { 0.0 };
- const float r_diff = delta_radius - delta_calibration_radius,
- h_factor = 1 / 6.0 *
- #ifdef H_FACTOR
- (H_FACTOR), // Set in Configuration.h
- #else
- (1.00 + r_diff * 0.001), // 1.02 for r_diff = 20mm
- #endif
- r_factor = 1 / 6.0 *
- #ifdef R_FACTOR
- -(R_FACTOR), // Set in Configuration.h
- #else
- -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), // 2.25 for r_diff = 20mm
- #endif
- a_factor = 1 / 6.0 *
- #ifdef A_FACTOR
- (A_FACTOR); // Set in Configuration.h
- #else
- (66.66 / delta_calibration_radius); // 0.83 for cal_rd = 80mm
- #endif
-
- #define ZP(N,I) ((N) * z_at_pt[I])
- #define Z6(I) ZP(6, I)
+ float e_delta[ABC] = { 0.0 },
+ r_delta = 0.0,
+ t_delta[ABC] = { 0.0 };
+
+ /**
+ * convergence matrices:
+ * see https://github.com/LVD-AC/Marlin-AC/tree/1.1.x-AC/documentation for
+ * - definition of the matrix scaling parameters
+ * - matrices for 4 and 7 point calibration
+ */
+ #define ZP(N,I) ((N) * z_at_pt[I] / 4.0) // 4.0 = divider to normalize to integers
+ #define Z12(I) ZP(12, I)
#define Z4(I) ZP(4, I)
#define Z2(I) ZP(2, I)
#define Z1(I) ZP(1, I)
+ #define Z0(I) ZP(0, I)
- #if !HAS_BED_PROBE
- test_precision = 0.00; // forced end
- #endif
+ // calculate factors
+ const float cr_old = delta_calibration_radius;
+ if (_7p_9_center) delta_calibration_radius *= 0.9;
+ h_factor = auto_tune_h();
+ r_factor = auto_tune_r();
+ a_factor = auto_tune_a();
+ delta_calibration_radius = cr_old;
switch (probe_points) {
+ case -1:
+ #if HAS_BED_PROBE
+ zprobe_zoffset += probe_z_shift(z_at_pt[CEN]);
+ #endif
+
case 0:
test_precision = 0.00; // forced end
break;
case 1:
test_precision = 0.00; // forced end
- LOOP_XYZ(axis) e_delta[axis] = Z1(CEN);
+ LOOP_XYZ(axis) e_delta[axis] = +Z4(CEN);
break;
case 2:
- if (towers_set) {
- e_delta[A_AXIS] = (Z6(CEN) +Z4(__A) -Z2(__B) -Z2(__C)) * h_factor;
- e_delta[B_AXIS] = (Z6(CEN) -Z2(__A) +Z4(__B) -Z2(__C)) * h_factor;
- e_delta[C_AXIS] = (Z6(CEN) -Z2(__A) -Z2(__B) +Z4(__C)) * h_factor;
- r_delta = (Z6(CEN) -Z2(__A) -Z2(__B) -Z2(__C)) * r_factor;
+ if (towers_set) { // see 4 point calibration (towers) matrix
+ e_delta[A_AXIS] = (+Z4(__A) -Z2(__B) -Z2(__C)) * h_factor +Z4(CEN);
+ e_delta[B_AXIS] = (-Z2(__A) +Z4(__B) -Z2(__C)) * h_factor +Z4(CEN);
+ e_delta[C_AXIS] = (-Z2(__A) -Z2(__B) +Z4(__C)) * h_factor +Z4(CEN);
+ r_delta = (+Z4(__A) +Z4(__B) +Z4(__C) -Z12(CEN)) * r_factor;
}
- else {
- e_delta[A_AXIS] = (Z6(CEN) -Z4(_BC) +Z2(_CA) +Z2(_AB)) * h_factor;
- e_delta[B_AXIS] = (Z6(CEN) +Z2(_BC) -Z4(_CA) +Z2(_AB)) * h_factor;
- e_delta[C_AXIS] = (Z6(CEN) +Z2(_BC) +Z2(_CA) -Z4(_AB)) * h_factor;
- r_delta = (Z6(CEN) -Z2(_BC) -Z2(_CA) -Z2(_AB)) * r_factor;
+ else { // see 4 point calibration (opposites) matrix
+ e_delta[A_AXIS] = (-Z4(_BC) +Z2(_CA) +Z2(_AB)) * h_factor +Z4(CEN);
+ e_delta[B_AXIS] = (+Z2(_BC) -Z4(_CA) +Z2(_AB)) * h_factor +Z4(CEN);
+ e_delta[C_AXIS] = (+Z2(_BC) +Z2(_CA) -Z4(_AB)) * h_factor +Z4(CEN);
+ r_delta = (+Z4(_BC) +Z4(_CA) +Z4(_AB) -Z12(CEN)) * r_factor;
}
break;
- default:
- e_delta[A_AXIS] = (Z6(CEN) +Z2(__A) -Z1(__B) -Z1(__C) -Z2(_BC) +Z1(_CA) +Z1(_AB)) * h_factor;
- e_delta[B_AXIS] = (Z6(CEN) -Z1(__A) +Z2(__B) -Z1(__C) +Z1(_BC) -Z2(_CA) +Z1(_AB)) * h_factor;
- e_delta[C_AXIS] = (Z6(CEN) -Z1(__A) -Z1(__B) +Z2(__C) +Z1(_BC) +Z1(_CA) -Z2(_AB)) * h_factor;
- r_delta = (Z6(CEN) -Z1(__A) -Z1(__B) -Z1(__C) -Z1(_BC) -Z1(_CA) -Z1(_AB)) * r_factor;
-
- if (towers_set) {
- t_delta[A_AXIS] = ( -Z4(__B) +Z4(__C) -Z4(_CA) +Z4(_AB)) * a_factor;
- t_delta[B_AXIS] = ( Z4(__A) -Z4(__C) +Z4(_BC) -Z4(_AB)) * a_factor;
- t_delta[C_AXIS] = (-Z4(__A) +Z4(__B) -Z4(_BC) +Z4(_CA) ) * a_factor;
- e_delta[A_AXIS] += (t_delta[B_AXIS] - t_delta[C_AXIS]) / 4.5;
- e_delta[B_AXIS] += (t_delta[C_AXIS] - t_delta[A_AXIS]) / 4.5;
- e_delta[C_AXIS] += (t_delta[A_AXIS] - t_delta[B_AXIS]) / 4.5;
+ default: // see 7 point calibration (towers & opposites) matrix
+ e_delta[A_AXIS] = (+Z2(__A) -Z1(__B) -Z1(__C) -Z2(_BC) +Z1(_CA) +Z1(_AB)) * h_factor +Z4(CEN);
+ e_delta[B_AXIS] = (-Z1(__A) +Z2(__B) -Z1(__C) +Z1(_BC) -Z2(_CA) +Z1(_AB)) * h_factor +Z4(CEN);
+ e_delta[C_AXIS] = (-Z1(__A) -Z1(__B) +Z2(__C) +Z1(_BC) +Z1(_CA) -Z2(_AB)) * h_factor +Z4(CEN);
+ r_delta = (+Z2(__A) +Z2(__B) +Z2(__C) +Z2(_BC) +Z2(_CA) +Z2(_AB) -Z12(CEN)) * r_factor;
+
+ if (towers_set) { // see 7 point tower angle calibration (towers & opposites) matrix
+ t_delta[A_AXIS] = (+Z0(__A) -Z4(__B) +Z4(__C) +Z0(_BC) -Z4(_CA) +Z4(_AB) +Z0(CEN)) * a_factor;
+ t_delta[B_AXIS] = (+Z4(__A) +Z0(__B) -Z4(__C) +Z4(_BC) +Z0(_CA) -Z4(_AB) +Z0(CEN)) * a_factor;
+ t_delta[C_AXIS] = (-Z4(__A) +Z4(__B) +Z0(__C) -Z4(_BC) +Z4(_CA) +Z0(_AB) +Z0(CEN)) * a_factor;
}
break;
}
-
LOOP_XYZ(axis) delta_endstop_adj[axis] += e_delta[axis];
delta_radius += r_delta;
LOOP_XYZ(axis) delta_tower_angle_trim[axis] += t_delta[axis];
}
- else if (zero_std_dev >= test_precision) { // step one back
+ else if (zero_std_dev >= test_precision) {
+ // roll back
COPY(delta_endstop_adj, e_old);
- delta_radius = dr_old;
- delta_height = zh_old;
- COPY(delta_tower_angle_trim, ta_old);
+ delta_radius = r_old;
+ delta_height = h_old;
+ COPY(delta_tower_angle_trim, a_old);
}
if (verbose_level != 0) { // !dry run
+
// normalise angles to least squares
if (_angle_results) {
float a_sum = 0.0;
@@ -628,15 +660,15 @@ void GcodeSuite::G33() {
// print report
- if (verbose_level > 2)
- print_G33_results(z_at_pt, _tower_results, _opposite_results);
+ if (verbose_level == 3)
+ print_calibration_results(z_at_pt, _tower_results, _opposite_results);
- if (verbose_level != 0) { // !dry run
- if ((zero_std_dev >= test_precision && iterations > force_iterations) || zero_std_dev <= calibration_precision) { // end iterations
+ if (verbose_level != 0) { // !dry run
+ if ((zero_std_dev >= test_precision && iterations > force_iterations) || zero_std_dev <= calibration_precision) { // end iterations
SERIAL_PROTOCOLPGM("Calibration OK");
SERIAL_PROTOCOL_SP(32);
#if HAS_BED_PROBE
- if (zero_std_dev >= test_precision && !_1p_calibration)
+ if (zero_std_dev >= test_precision && !_1p_calibration && !_0p_calibration)
SERIAL_PROTOCOLPGM("rolling back.");
else
#endif
@@ -648,15 +680,15 @@ void GcodeSuite::G33() {
char mess[21];
strcpy_P(mess, PSTR("Calibration sd:"));
if (zero_std_dev_min < 1)
- sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev_min * 1000.0));
+ sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev_min * 1000.0));
else
- sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev_min));
+ sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev_min));
lcd_setstatus(mess);
- print_G33_settings(_endstop_results, _angle_results);
+ print_calibration_settings(_endstop_results, _angle_results);
serialprintPGM(save_message);
SERIAL_EOL();
}
- else { // !end iterations
+ else { // !end iterations
char mess[15];
if (iterations < 31)
sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
@@ -669,11 +701,11 @@ void GcodeSuite::G33() {
SERIAL_EOL();
lcd_setstatus(mess);
if (verbose_level > 1)
- print_G33_settings(_endstop_results, _angle_results);
+ print_calibration_settings(_endstop_results, _angle_results);
}
}
- else { // dry run
- PGM_P enddryrun = PSTR("End DRY-RUN");
+ else { // dry run
+ const char *enddryrun = PSTR("End DRY-RUN");
serialprintPGM(enddryrun);
SERIAL_PROTOCOL_SP(35);
SERIAL_PROTOCOLPGM("std dev:");
@@ -684,21 +716,16 @@ void GcodeSuite::G33() {
strcpy_P(mess, enddryrun);
strcpy_P(&mess[11], PSTR(" sd:"));
if (zero_std_dev < 1)
- sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev * 1000.0));
+ sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev * 1000.0));
else
- sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev));
+ sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev));
lcd_setstatus(mess);
}
-
- endstops.enable(true);
- if (!home_delta())
- return;
- endstops.not_homing();
-
+ ac_home();
}
while (((zero_std_dev < test_precision && iterations < 31) || iterations <= force_iterations) && zero_std_dev > calibration_precision);
- G33_CLEANUP();
+ AC_CLEANUP();
}
#endif // DELTA_AUTO_CALIBRATION
diff --git a/Marlin/src/gcode/calibrate/M100.cpp b/Marlin/src/gcode/calibrate/M100.cpp
index 8b01f85d3b58..fe6e58689709 100644
--- a/Marlin/src/gcode/calibrate/M100.cpp
+++ b/Marlin/src/gcode/calibrate/M100.cpp
@@ -25,6 +25,7 @@
#if ENABLED(M100_FREE_MEMORY_WATCHER)
#include "../gcode.h"
+#include "../queue.h"
#include "../../libs/hex_print_routines.h"
#include "../../Marlin.h" // for idle()
@@ -59,8 +60,6 @@
#define TEST_BYTE ((char) 0xE5)
-extern char command_queue[BUFSIZE][MAX_CMD_SIZE];
-
extern char* __brkval;
extern size_t __heap_start, __heap_end, __flp;
extern char __bss_end;
diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp
index 14efec5e009e..dd646961f729 100644
--- a/Marlin/src/gcode/calibrate/M48.cpp
+++ b/Marlin/src/gcode/calibrate/M48.cpp
@@ -111,7 +111,7 @@ void GcodeSuite::M48() {
setup_for_endstop_or_probe_move();
- double mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples];
+ float mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples];
// Move to the first point, deploy, and probe
const float t = probe_pt(X_probe_location, Y_probe_location, raise_after, verbose_level);
@@ -129,7 +129,7 @@ void GcodeSuite::M48() {
(int) (0.1250000000 * (DELTA_PRINTABLE_RADIUS)),
(int) (0.3333333333 * (DELTA_PRINTABLE_RADIUS))
#else
- (int) 5.0, (int) (0.125 * min(X_BED_SIZE, Y_BED_SIZE))
+ (int) 5.0, (int) (0.125 * MIN(X_BED_SIZE, Y_BED_SIZE))
#endif
);
@@ -142,7 +142,7 @@ void GcodeSuite::M48() {
}
for (uint8_t l = 0; l < n_legs - 1; l++) {
- double delta_angle;
+ float delta_angle;
if (schizoid_flag)
// The points of a 5 point star are 72 degrees apart. We need to
@@ -199,7 +199,7 @@ void GcodeSuite::M48() {
/**
* Get the current mean for the data points we have so far
*/
- double sum = 0.0;
+ float sum = 0.0;
for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
mean = sum / (n + 1);
diff --git a/Marlin/src/gcode/calibrate/M665.cpp b/Marlin/src/gcode/calibrate/M665.cpp
index 902556460df8..75d01b849af2 100644
--- a/Marlin/src/gcode/calibrate/M665.cpp
+++ b/Marlin/src/gcode/calibrate/M665.cpp
@@ -40,7 +40,7 @@
* B = delta calibration radius
* X = Alpha (Tower 1) angle trim
* Y = Beta (Tower 2) angle trim
- * Z = Rotate A and B by this angle
+ * Z = Gamma (Tower 3) angle trim
*/
void GcodeSuite::M665() {
if (parser.seen('H')) delta_height = parser.value_linear_units();
diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp
index 1537710d4e44..cd45047be60f 100644
--- a/Marlin/src/gcode/config/M200-M205.cpp
+++ b/Marlin/src/gcode/config/M200-M205.cpp
@@ -40,7 +40,7 @@
// setting any extruder filament size disables volumetric on the assumption that
// slicers either generate in extruder values as cubic mm or as as filament feeds
// for all extruders
- if ( (parser.volumetric_enabled = (parser.value_linear_units() != 0.0)) )
+ if ( (parser.volumetric_enabled = (parser.value_linear_units() != 0)) )
planner.set_filament_size(target_extruder, parser.value_linear_units());
}
planner.calculate_volumetric_multipliers();
@@ -118,26 +118,41 @@ void GcodeSuite::M204() {
/**
* M205: Set Advanced Settings
*
+ * B = Min Segment Time (µs)
* S = Min Feed Rate (units/s)
* T = Min Travel Feed Rate (units/s)
- * B = Min Segment Time (µs)
* X = Max X Jerk (units/sec^2)
* Y = Max Y Jerk (units/sec^2)
* Z = Max Z Jerk (units/sec^2)
* E = Max E Jerk (units/sec^2)
+ * J = Junction Deviation (mm) (Requires JUNCTION_DEVIATION)
*/
void GcodeSuite::M205() {
+ if (parser.seen('B')) planner.min_segment_time_us = parser.value_ulong();
if (parser.seen('S')) planner.min_feedrate_mm_s = parser.value_linear_units();
if (parser.seen('T')) planner.min_travel_feedrate_mm_s = parser.value_linear_units();
- if (parser.seen('B')) planner.min_segment_time_us = parser.value_ulong();
- if (parser.seen('X')) planner.max_jerk[X_AXIS] = parser.value_linear_units();
- if (parser.seen('Y')) planner.max_jerk[Y_AXIS] = parser.value_linear_units();
- if (parser.seen('Z')) {
- planner.max_jerk[Z_AXIS] = parser.value_linear_units();
- #if HAS_MESH
- if (planner.max_jerk[Z_AXIS] <= 0.1)
- SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses.");
- #endif
- }
- if (parser.seen('E')) planner.max_jerk[E_AXIS] = parser.value_linear_units();
+ #if ENABLED(JUNCTION_DEVIATION)
+ if (parser.seen('J')) {
+ const float junc_dev = parser.value_linear_units();
+ if (WITHIN(junc_dev, 0.01f, 0.3f)) {
+ planner.junction_deviation_mm = junc_dev;
+ planner.recalculate_max_e_jerk();
+ }
+ else {
+ SERIAL_ERROR_START();
+ SERIAL_ERRORLNPGM("?J out of range (0.01 to 0.3)");
+ }
+ }
+ #else
+ if (parser.seen('X')) planner.max_jerk[X_AXIS] = parser.value_linear_units();
+ if (parser.seen('Y')) planner.max_jerk[Y_AXIS] = parser.value_linear_units();
+ if (parser.seen('Z')) {
+ planner.max_jerk[Z_AXIS] = parser.value_linear_units();
+ #if HAS_MESH
+ if (planner.max_jerk[Z_AXIS] <= 0.1f)
+ SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses.");
+ #endif
+ }
+ if (parser.seen('E')) planner.max_jerk[E_AXIS] = parser.value_linear_units();
+ #endif
}
diff --git a/Marlin/src/gcode/config/M218.cpp b/Marlin/src/gcode/config/M218.cpp
index 69452e347ca7..47910e07450c 100644
--- a/Marlin/src/gcode/config/M218.cpp
+++ b/Marlin/src/gcode/config/M218.cpp
@@ -37,7 +37,7 @@
* T
* X
* Y
- * Z - Available with DUAL_X_CARRIAGE and SWITCHING_NOZZLE
+ * Z - Available with DUAL_X_CARRIAGE, SWITCHING_NOZZLE and PARKING_EXTRUDER
*/
void GcodeSuite::M218() {
if (get_target_extruder_from_command() || target_extruder == 0) return;
@@ -52,7 +52,7 @@ void GcodeSuite::M218() {
report = false;
}
- #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
+ #if HAS_HOTEND_OFFSET_Z
if (parser.seenval('Z')) {
hotend_offset[Z_AXIS][target_extruder] = parser.value_linear_units();
report = false;
@@ -67,7 +67,7 @@ void GcodeSuite::M218() {
SERIAL_ECHO(hotend_offset[X_AXIS][e]);
SERIAL_CHAR(',');
SERIAL_ECHO(hotend_offset[Y_AXIS][e]);
- #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
+ #if HAS_HOTEND_OFFSET_Z
SERIAL_CHAR(',');
SERIAL_ECHO(hotend_offset[Z_AXIS][e]);
#endif
diff --git a/Marlin/src/gcode/config/M221.cpp b/Marlin/src/gcode/config/M221.cpp
index 7d6c64343689..e5d4204f5e35 100644
--- a/Marlin/src/gcode/config/M221.cpp
+++ b/Marlin/src/gcode/config/M221.cpp
@@ -32,4 +32,12 @@ void GcodeSuite::M221() {
planner.flow_percentage[target_extruder] = parser.value_int();
planner.refresh_e_factor(target_extruder);
}
+ else {
+ SERIAL_ECHO_START();
+ SERIAL_CHAR('E');
+ SERIAL_CHAR('0' + target_extruder);
+ SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
+ SERIAL_CHAR('%');
+ SERIAL_EOL();
+ }
}
diff --git a/Marlin/src/gcode/config/M301.cpp b/Marlin/src/gcode/config/M301.cpp
index 9d876224fcb1..f61896ac7306 100644
--- a/Marlin/src/gcode/config/M301.cpp
+++ b/Marlin/src/gcode/config/M301.cpp
@@ -37,7 +37,7 @@
* With PID_EXTRUSION_SCALING:
*
* C[float] Kc term
- * L[float] LPQ length
+ * L[int] LPQ length
*/
void GcodeSuite::M301() {
@@ -51,8 +51,9 @@ void GcodeSuite::M301() {
if (parser.seen('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float());
#if ENABLED(PID_EXTRUSION_SCALING)
if (parser.seen('C')) PID_PARAM(Kc, e) = parser.value_float();
- if (parser.seen('L')) lpq_len = parser.value_float();
- NOMORE(lpq_len, LPQ_MAX_LEN);
+ if (parser.seenval('L')) thermalManager.lpq_len = parser.value_int();
+ NOMORE(thermalManager.lpq_len, LPQ_MAX_LEN);
+ NOLESS(thermalManager.lpq_len, 0);
#endif
thermalManager.updatePID();
diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp
index c00046802268..e9d36efd6783 100644
--- a/Marlin/src/gcode/config/M43.cpp
+++ b/Marlin/src/gcode/config/M43.cpp
@@ -35,7 +35,7 @@
#endif
inline void toggle_pins() {
- const bool I_flag = parser.boolval('I');
+ const bool ignore_protection = parser.boolval('I');
const int repeat = parser.intval('R', 1),
start = PARSED_PIN_INDEX('S', 0),
end = PARSED_PIN_INDEX('E', NUM_DIGITAL_PINS - 1),
@@ -43,14 +43,14 @@ inline void toggle_pins() {
for (uint8_t i = start; i <= end; i++) {
pin_t pin = GET_PIN_MAP_PIN(i);
- //report_pin_state_extended(pin, I_flag, false);
+ //report_pin_state_extended(pin, ignore_protection, false);
if (!VALID_PIN(pin)) continue;
- if (!I_flag && pin_is_protected(pin)) {
- report_pin_state_extended(pin, I_flag, true, "Untouched ");
+ if (!ignore_protection && pin_is_protected(pin)) {
+ report_pin_state_extended(pin, ignore_protection, true, "Untouched ");
SERIAL_EOL();
}
else {
- report_pin_state_extended(pin, I_flag, true, "Pulsing ");
+ report_pin_state_extended(pin, ignore_protection, true, "Pulsing ");
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
if (pin == TEENSY_E2) {
SET_OUTPUT(TEENSY_E2);
@@ -275,7 +275,7 @@ void GcodeSuite::M43() {
for (uint8_t i = first_pin; i <= last_pin; i++) {
pin_t pin = GET_PIN_MAP_PIN(i);
if (!VALID_PIN(pin)) continue;
- if (pin_is_protected(pin) && !ignore_protection) continue;
+ if (!ignore_protection && pin_is_protected(pin)) continue;
pinMode(pin, INPUT_PULLUP);
delay(1);
/*
@@ -295,7 +295,7 @@ void GcodeSuite::M43() {
for (uint8_t i = first_pin; i <= last_pin; i++) {
pin_t pin = GET_PIN_MAP_PIN(i);
if (!VALID_PIN(pin)) continue;
- if (pin_is_protected(pin) && !ignore_protection) continue;
+ if (!ignore_protection && pin_is_protected(pin)) continue;
const byte val =
/*
IS_ANALOG(pin)
diff --git a/Marlin/src/gcode/config/M540.cpp b/Marlin/src/gcode/config/M540.cpp
index 498aa9e76f8b..d55425803092 100644
--- a/Marlin/src/gcode/config/M540.cpp
+++ b/Marlin/src/gcode/config/M540.cpp
@@ -33,7 +33,7 @@
void GcodeSuite::M540() {
if (parser.seen('S'))
- stepper.abort_on_endstop_hit = parser.value_bool();
+ planner.abort_on_endstop_hit = parser.value_bool();
}
diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp
index 25c79fe0b82e..310b754aa39c 100644
--- a/Marlin/src/gcode/config/M92.cpp
+++ b/Marlin/src/gcode/config/M92.cpp
@@ -37,9 +37,11 @@ void GcodeSuite::M92() {
if (parser.seen(axis_codes[i])) {
if (i == E_AXIS) {
const float value = parser.value_per_axis_unit((AxisEnum)(E_AXIS + TARGET_EXTRUDER));
- if (value < 20.0) {
+ if (value < 20) {
float factor = planner.axis_steps_per_mm[E_AXIS + TARGET_EXTRUDER] / value; // increase e constants if M92 E14 is given for netfab.
- planner.max_jerk[E_AXIS] *= factor;
+ #if DISABLED(JUNCTION_DEVIATION)
+ planner.max_jerk[E_AXIS] *= factor;
+ #endif
planner.max_feedrate_mm_s[E_AXIS + TARGET_EXTRUDER] *= factor;
planner.max_acceleration_steps_per_s2[E_AXIS + TARGET_EXTRUDER] *= factor;
}
diff --git a/Marlin/src/gcode/control/M111.cpp b/Marlin/src/gcode/control/M111.cpp
index 1850ed2db8a9..96587a1fc13f 100644
--- a/Marlin/src/gcode/control/M111.cpp
+++ b/Marlin/src/gcode/control/M111.cpp
@@ -28,7 +28,7 @@
void GcodeSuite::M111() {
if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
- const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
+ static const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
str_debug_2[] PROGMEM = MSG_DEBUG_INFO,
str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS,
str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN,
@@ -38,7 +38,7 @@ void GcodeSuite::M111() {
#endif
;
- const static char* const debug_strings[] PROGMEM = {
+ static const char* const debug_strings[] PROGMEM = {
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16
#if ENABLED(DEBUG_LEVELING_FEATURE)
, str_debug_32
@@ -58,6 +58,23 @@ void GcodeSuite::M111() {
}
else {
SERIAL_ECHOPGM(MSG_DEBUG_OFF);
+ #if !defined(__AVR__) || !defined(USBCON)
+ #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
+ SERIAL_ECHOPAIR("\nBuffer Overruns: ", customizedSerial.buffer_overruns());
+ #endif
+
+ #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
+ SERIAL_ECHOPAIR("\nFraming Errors: ", customizedSerial.framing_errors());
+ #endif
+
+ #if ENABLED(SERIAL_STATS_DROPPED_RX)
+ SERIAL_ECHOPAIR("\nDropped bytes: ", customizedSerial.dropped());
+ #endif
+
+ #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
+ SERIAL_ECHOPAIR("\nMax RX Queue Size: ", customizedSerial.rxMaxEnqueued());
+ #endif
+ #endif // !defined(__AVR__) || !defined(USBCON)
}
SERIAL_EOL();
}
diff --git a/Marlin/src/gcode/control/M17_M18_M84.cpp b/Marlin/src/gcode/control/M17_M18_M84.cpp
index 34da0b10497f..c428a878777d 100644
--- a/Marlin/src/gcode/control/M17_M18_M84.cpp
+++ b/Marlin/src/gcode/control/M17_M18_M84.cpp
@@ -47,10 +47,10 @@ void GcodeSuite::M18_M84() {
else {
bool all_axis = !(parser.seen('X') || parser.seen('Y') || parser.seen('Z') || parser.seen('E'));
if (all_axis) {
- stepper.finish_and_disable();
+ planner.finish_and_disable();
}
else {
- stepper.synchronize();
+ planner.synchronize();
if (parser.seen('X')) disable_X();
if (parser.seen('Y')) disable_Y();
if (parser.seen('Z')) disable_Z();
diff --git a/Marlin/src/gcode/control/M226.cpp b/Marlin/src/gcode/control/M226.cpp
index 889bac118c1c..59071aadf332 100644
--- a/Marlin/src/gcode/control/M226.cpp
+++ b/Marlin/src/gcode/control/M226.cpp
@@ -33,27 +33,20 @@ void GcodeSuite::M226() {
pin_state = parser.intval('S', -1); // required pin state - default is inverted
const pin_t pin = GET_PIN_MAP_PIN(pin_number);
- if (WITHIN(pin_state, -1, 1) && pin > -1 && !pin_is_protected(pin)) {
-
- int target = LOW;
-
- stepper.synchronize();
-
- pinMode(pin, INPUT);
- switch (pin_state) {
- case 1:
- target = HIGH;
- break;
- case 0:
- target = LOW;
- break;
- case -1:
- target = !digitalRead(pin);
- break;
+ if (WITHIN(pin_state, -1, 1) && pin > -1) {
+ if (pin_is_protected(pin))
+ protected_pin_err();
+ else {
+ int target = LOW;
+ planner.synchronize();
+ pinMode(pin, INPUT);
+ switch (pin_state) {
+ case 1: target = HIGH; break;
+ case 0: target = LOW; break;
+ case -1: target = !digitalRead(pin); break;
+ }
+ while (digitalRead(pin) != target) idle();
}
-
- while (digitalRead(pin) != target) idle();
-
} // pin_state -1 0 1 && pin > -1
} // parser.seen('P')
}
diff --git a/Marlin/src/gcode/control/M3-M5.cpp b/Marlin/src/gcode/control/M3-M5.cpp
index 1fea7e56f1b3..213d17450a07 100644
--- a/Marlin/src/gcode/control/M3-M5.cpp
+++ b/Marlin/src/gcode/control/M3-M5.cpp
@@ -79,7 +79,7 @@ inline void ocr_val_mode() {
void GcodeSuite::M3_M4(bool is_M3) {
- stepper.synchronize(); // wait until previous movement commands (G0/G0/G2/G3) have completed before playing with the spindle
+ planner.synchronize(); // wait until previous movement commands (G0/G0/G2/G3) have completed before playing with the spindle
#if SPINDLE_DIR_CHANGE
const bool rotation_dir = (is_M3 != SPINDLE_INVERT_DIR);
if (SPINDLE_STOP_ON_DIR_CHANGE \
@@ -107,12 +107,12 @@ void GcodeSuite::M3_M4(bool is_M3) {
delay_for_power_down();
}
else {
- int16_t ocr_val = (spindle_laser_power - (SPEED_POWER_INTERCEPT)) * (1.0 / (SPEED_POWER_SLOPE)); // convert RPM to PWM duty cycle
+ int16_t ocr_val = (spindle_laser_power - (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE)); // convert RPM to PWM duty cycle
NOMORE(ocr_val, 255); // limit to max the Atmel PWM will support
if (spindle_laser_power <= SPEED_POWER_MIN)
- ocr_val = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * (1.0 / (SPEED_POWER_SLOPE)); // minimum setting
+ ocr_val = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE)); // minimum setting
if (spindle_laser_power >= SPEED_POWER_MAX)
- ocr_val = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * (1.0 / (SPEED_POWER_SLOPE)); // limit to max RPM
+ ocr_val = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * (1.0f / (SPEED_POWER_SLOPE)); // limit to max RPM
if (SPINDLE_LASER_PWM_INVERT) ocr_val = 255 - ocr_val;
WRITE(SPINDLE_LASER_ENABLE_PIN, SPINDLE_LASER_ENABLE_INVERT); // turn spindle on (active low)
analogWrite(SPINDLE_LASER_PWM_PIN, ocr_val & 0xFF); // only write low byte
@@ -129,7 +129,7 @@ void GcodeSuite::M3_M4(bool is_M3) {
* M5 turn off spindle
*/
void GcodeSuite::M5() {
- stepper.synchronize();
+ planner.synchronize();
WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT);
#if ENABLED(SPINDLE_LASER_PWM)
analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);
diff --git a/Marlin/src/gcode/control/M400.cpp b/Marlin/src/gcode/control/M400.cpp
index 0cd1049591e7..f55f626d098e 100644
--- a/Marlin/src/gcode/control/M400.cpp
+++ b/Marlin/src/gcode/control/M400.cpp
@@ -28,6 +28,6 @@
*/
void GcodeSuite::M400() {
- stepper.synchronize();
+ planner.synchronize();
}
diff --git a/Marlin/src/gcode/control/M42.cpp b/Marlin/src/gcode/control/M42.cpp
index 5b0a53682016..f197b6e37f26 100644
--- a/Marlin/src/gcode/control/M42.cpp
+++ b/Marlin/src/gcode/control/M42.cpp
@@ -41,11 +41,8 @@ void GcodeSuite::M42() {
if (pin_index < 0) return;
const pin_t pin = GET_PIN_MAP_PIN(pin_index);
- if (pin_is_protected(pin)) {
- SERIAL_ERROR_START();
- SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN);
- return;
- }
+
+ if (pin_is_protected(pin)) return protected_pin_err();
pinMode(pin, OUTPUT);
digitalWrite(pin, pin_status);
diff --git a/Marlin/src/gcode/control/M605.cpp b/Marlin/src/gcode/control/M605.cpp
index 4cfa571990be..13ab424603ef 100644
--- a/Marlin/src/gcode/control/M605.cpp
+++ b/Marlin/src/gcode/control/M605.cpp
@@ -43,14 +43,14 @@
* Note: the X axis should be homed after changing dual x-carriage mode.
*/
void GcodeSuite::M605() {
- stepper.synchronize();
+ planner.synchronize();
if (parser.seen('S')) dual_x_carriage_mode = (DualXMode)parser.value_byte();
switch (dual_x_carriage_mode) {
case DXC_FULL_CONTROL_MODE:
case DXC_AUTO_PARK_MODE:
break;
case DXC_DUPLICATION_MODE:
- if (parser.seen('X')) duplicate_extruder_x_offset = max(parser.value_linear_units(), X2_MIN_POS - x_home_pos(0));
+ if (parser.seen('X')) duplicate_extruder_x_offset = MAX(parser.value_linear_units(), X2_MIN_POS - x_home_pos(0));
if (parser.seen('R')) duplicate_extruder_temp_offset = parser.value_celsius_diff();
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
@@ -75,7 +75,7 @@
#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
void GcodeSuite::M605() {
- stepper.synchronize();
+ planner.synchronize();
extruder_duplication_enabled = parser.intval('S') == (int)DXC_DUPLICATION_MODE;
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp
index 59ae933221c7..4047049f548e 100644
--- a/Marlin/src/gcode/control/M80_M81.cpp
+++ b/Marlin/src/gcode/control/M80_M81.cpp
@@ -41,13 +41,13 @@
#endif
// Could be moved to a feature, but this is all the data
- bool powersupply_on =
+ bool powersupply_on = (
#if ENABLED(PS_DEFAULT_OFF)
false
#else
true
#endif
- ;
+ );
#if HAS_TRINAMIC
#include "../../feature/tmc_util.h"
@@ -82,7 +82,7 @@
#endif
#if ENABLED(ULTIPANEL)
- LCD_MESSAGEPGM(WELCOME_MSG);
+ lcd_reset_status();
#endif
}
@@ -95,7 +95,7 @@
*/
void GcodeSuite::M81() {
thermalManager.disable_all_heaters();
- stepper.finish_and_disable();
+ planner.finish_and_disable();
#if FAN_COUNT > 0
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
@@ -108,7 +108,6 @@ void GcodeSuite::M81() {
safe_delay(1000); // Wait 1 second before switching off
#if HAS_SUICIDE
- stepper.synchronize();
suicide();
#elif HAS_POWER_SWITCH
PSU_OFF();
diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp
index dd286e0475c8..3627869a0685 100644
--- a/Marlin/src/gcode/feature/advance/M900.cpp
+++ b/Marlin/src/gcode/feature/advance/M900.cpp
@@ -37,7 +37,7 @@ void GcodeSuite::M900() {
if (parser.seenval('K')) {
const float newK = parser.floatval('K');
if (WITHIN(newK, 0, 10)) {
- stepper.synchronize();
+ planner.synchronize();
planner.extruder_advance_K = newK;
}
else
diff --git a/Marlin/src/gcode/feature/leds/M7219.cpp b/Marlin/src/gcode/feature/leds/M7219.cpp
new file mode 100644
index 000000000000..62edcecea6c1
--- /dev/null
+++ b/Marlin/src/gcode/feature/leds/M7219.cpp
@@ -0,0 +1,81 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#include "../../../inc/MarlinConfigPre.h"
+
+#if ENABLED(MAX7219_GCODE)
+
+#include "../../gcode.h"
+#include "../../../feature/Max7219_Debug_LEDs.h"
+
+/**
+ * M7219: Control the Max7219 LED matrix
+ *
+ * I - Initialize (clear) the matrix
+ * F - Fill the matrix (set all bits)
+ * P - Dump the LEDs[] array values
+ * C - Set a column to the 8-bit value V
+ * R - Set a row to the 8-bit value V
+ * X - X position of an LED to set or toggle
+ * Y - Y position of an LED to set or toggle
+ * V - The potentially 32-bit value or on/off state to set
+ * (for example: a chain of 4 Max7219 devices can have 32 bit
+ * rows or columns depending upon rotation)
+ */
+void GcodeSuite::M7219() {
+ if (parser.seen('I'))
+ Max7219_Clear();
+
+ if (parser.seen('F'))
+ for (uint8_t x = 0; x < MAX7219_X_LEDS; x++)
+ Max7219_Set_Column(x, 0xFFFFFFFF);
+
+ if (parser.seenval('R')) {
+ const uint32_t r = parser.value_int();
+ Max7219_Set_Row(r, parser.ulongval('V'));
+ return;
+ }
+ else if (parser.seenval('C')) {
+ const uint32_t c = parser.value_int();
+ Max7219_Set_Column(c, parser.ulongval('V'));
+ return;
+ }
+
+ if (parser.seenval('X') || parser.seenval('Y')) {
+ const uint8_t x = parser.byteval('X'), y = parser.byteval('Y');
+ if (parser.seenval('V'))
+ Max7219_LED_Set(x, y, parser.boolval('V'));
+ else
+ Max7219_LED_Toggle(x, y);
+ }
+
+ if (parser.seen('P')) {
+ for (uint8_t x = 0; x < COUNT(LEDs); x++) {
+ SERIAL_ECHOPAIR("LEDs[", x);
+ SERIAL_ECHOPAIR("]=", LEDs[x]);
+ SERIAL_EOL();
+ }
+ return;
+ }
+}
+
+#endif // MAX7219_GCODE
diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp
index f25b0907da71..fbba475f2a53 100644
--- a/Marlin/src/gcode/feature/pause/M125.cpp
+++ b/Marlin/src/gcode/feature/pause/M125.cpp
@@ -50,7 +50,7 @@
*/
void GcodeSuite::M125() {
// Initial retract before move to filament change position
- const float retract = -FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
+ const float retract = -ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
#ifdef PAUSE_PARK_RETRACT_LENGTH
+ (PAUSE_PARK_RETRACT_LENGTH)
#endif
diff --git a/Marlin/src/gcode/feature/pause/M600.cpp b/Marlin/src/gcode/feature/pause/M600.cpp
index 2a34f5baa4d1..be03c736c9c9 100644
--- a/Marlin/src/gcode/feature/pause/M600.cpp
+++ b/Marlin/src/gcode/feature/pause/M600.cpp
@@ -74,31 +74,34 @@ void GcodeSuite::M600() {
#endif
// Initial retract before move to filament change position
- const float retract = -FABS(parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0
+ const float retract = -ABS(parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0
#ifdef PAUSE_PARK_RETRACT_LENGTH
+ (PAUSE_PARK_RETRACT_LENGTH)
#endif
);
+ // Lift Z axis
+ if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
+
// Move XY axes to filament change position or given position
if (parser.seenval('X')) park_point.x = parser.linearval('X');
if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
- // Lift Z axis
- if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
-
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
#endif
// Unload filament
- const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
+ const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
: filament_change_unload_length[active_extruder]);
- // Load filament
- const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
- : filament_change_load_length[active_extruder]);
+ // Slow load filament
+ constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
+
+ // Fast load filament
+ const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
+ : filament_change_load_length[active_extruder]);
const int beep_count = parser.intval('B',
#ifdef FILAMENT_CHANGE_ALERT_BEEPS
@@ -112,7 +115,7 @@ void GcodeSuite::M600() {
if (pause_print(retract, park_point, unload_length, true)) {
wait_for_filament_reload(beep_count);
- resume_print(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, beep_count);
+ resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count);
}
#if EXTRUDERS > 1
diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp
index 3ac44cc7b967..a6231c3169a9 100644
--- a/Marlin/src/gcode/feature/pause/M603.cpp
+++ b/Marlin/src/gcode/feature/pause/M603.cpp
@@ -47,7 +47,7 @@ void GcodeSuite::M603() {
// Unload length
if (parser.seen('U')) {
- filament_change_unload_length[target_extruder] = FABS(parser.value_axis_units(E_AXIS));
+ filament_change_unload_length[target_extruder] = ABS(parser.value_axis_units(E_AXIS));
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
NOMORE(filament_change_unload_length[target_extruder], EXTRUDE_MAXLENGTH);
#endif
@@ -55,7 +55,7 @@ void GcodeSuite::M603() {
// Load length
if (parser.seen('L')) {
- filament_change_load_length[target_extruder] = FABS(parser.value_axis_units(E_AXIS));
+ filament_change_load_length[target_extruder] = ABS(parser.value_axis_units(E_AXIS));
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
NOMORE(filament_change_load_length[target_extruder], EXTRUDE_MAXLENGTH);
#endif
diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp
index 301890cc455f..d9b4175cea36 100644
--- a/Marlin/src/gcode/feature/pause/M701_M702.cpp
+++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp
@@ -41,9 +41,9 @@
/**
* M701: Load filament
*
- * T[extruder] - Optional extruder number. Current extruder if omitted.
- * Z[distance] - Move the Z axis by this distance
- * L[distance] - Extrude distance for insertion (positive value) (manual reload)
+ * T - Optional extruder number. Current extruder if omitted.
+ * Z - Move the Z axis by this distance
+ * L - Extrude distance for insertion (positive value) (manual reload)
*
* Default values are used for omitted arguments.
*/
@@ -60,10 +60,6 @@ void GcodeSuite::M701() {
// Z axis lift
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
- // Load filament
- const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) :
- filament_change_load_length[target_extruder]);
-
// Show initial "wait for load" message
#if ENABLED(ULTIPANEL)
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
@@ -78,14 +74,18 @@ void GcodeSuite::M701() {
// Lift Z axis
if (park_point.z > 0)
- do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
+ do_blocking_move_to_z(MIN(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
- load_filament(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS, true,
- thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
+ // Load filament
+ constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
+ const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
+ : filament_change_load_length[active_extruder]);
+ load_filament(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS,
+ true, thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
// Restore Z axis
if (park_point.z > 0)
- do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, Z_MIN_POS), NOZZLE_PARK_Z_FEEDRATE);
+ do_blocking_move_to_z(MAX(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE);
#if EXTRUDERS > 1
// Restore toolhead if it was changed
@@ -102,10 +102,10 @@ void GcodeSuite::M701() {
/**
* M702: Unload filament
*
- * T[extruder] - Optional extruder number. If omitted, current extruder
+ * T - Optional extruder number. If omitted, current extruder
* (or ALL extruders with FILAMENT_UNLOAD_ALL_EXTRUDERS).
- * Z[distance] - Move the Z axis by this distance
- * U[distance] - Retract distance for removal (manual reload)
+ * Z - Move the Z axis by this distance
+ * U - Retract distance for removal (manual reload)
*
* Default values are used for omitted arguments.
*/
@@ -136,7 +136,7 @@ void GcodeSuite::M702() {
// Lift Z axis
if (park_point.z > 0)
- do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
+ do_blocking_move_to_z(MIN(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
// Unload filament
#if EXTRUDERS > 1 && ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
@@ -150,7 +150,7 @@ void GcodeSuite::M702() {
#endif
{
// Unload length
- const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) :
+ const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) :
filament_change_unload_length[target_extruder]);
unload_filament(unload_length, true, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT);
@@ -158,7 +158,7 @@ void GcodeSuite::M702() {
// Restore Z axis
if (park_point.z > 0)
- do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, Z_MIN_POS), NOZZLE_PARK_Z_FEEDRATE);
+ do_blocking_move_to_z(MAX(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE);
#if EXTRUDERS > 1
// Restore toolhead if it was changed
diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp
index 8ba6453339b9..22d9a3f90a03 100644
--- a/Marlin/src/gcode/feature/trinamic/M906.cpp
+++ b/Marlin/src/gcode/feature/trinamic/M906.cpp
@@ -34,7 +34,7 @@
*/
void GcodeSuite::M906() {
#define TMC_SAY_CURRENT(Q) tmc_get_current(stepper##Q, TMC_##Q)
- #define TMC_SET_CURRENT(Q) tmc_set_current(stepper##Q, TMC_##Q, value)
+ #define TMC_SET_CURRENT(Q) tmc_set_current(stepper##Q, value)
bool report = true;
const uint8_t index = parser.byteval('I');
@@ -42,45 +42,45 @@ void GcodeSuite::M906() {
report = false;
switch (i) {
case X_AXIS:
- #if X_IS_TRINAMIC
+ #if AXIS_IS_TMC(X)
if (index == 0) TMC_SET_CURRENT(X);
#endif
- #if X2_IS_TRINAMIC
+ #if AXIS_IS_TMC(X2)
if (index == 1) TMC_SET_CURRENT(X2);
#endif
break;
case Y_AXIS:
- #if Y_IS_TRINAMIC
+ #if AXIS_IS_TMC(Y)
if (index == 0) TMC_SET_CURRENT(Y);
#endif
- #if Y2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Y2)
if (index == 1) TMC_SET_CURRENT(Y2);
#endif
break;
case Z_AXIS:
- #if Z_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z)
if (index == 0) TMC_SET_CURRENT(Z);
#endif
- #if Z2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z2)
if (index == 1) TMC_SET_CURRENT(Z2);
#endif
break;
case E_AXIS: {
if (get_target_extruder_from_command()) return;
switch (target_extruder) {
- #if E0_IS_TRINAMIC
+ #if AXIS_IS_TMC(E0)
case 0: TMC_SET_CURRENT(E0); break;
#endif
- #if E1_IS_TRINAMIC
+ #if AXIS_IS_TMC(E1)
case 1: TMC_SET_CURRENT(E1); break;
#endif
- #if E2_IS_TRINAMIC
+ #if AXIS_IS_TMC(E2)
case 2: TMC_SET_CURRENT(E2); break;
#endif
- #if E3_IS_TRINAMIC
+ #if AXIS_IS_TMC(E3)
case 3: TMC_SET_CURRENT(E3); break;
#endif
- #if E4_IS_TRINAMIC
+ #if AXIS_IS_TMC(E4)
case 4: TMC_SET_CURRENT(E4); break;
#endif
}
@@ -88,48 +88,40 @@ void GcodeSuite::M906() {
}
}
- if (report) LOOP_XYZE(i) switch (i) {
- case X_AXIS:
- #if X_IS_TRINAMIC
- TMC_SAY_CURRENT(X);
- #endif
- #if X2_IS_TRINAMIC
- TMC_SAY_CURRENT(X2);
- #endif
- break;
- case Y_AXIS:
- #if Y_IS_TRINAMIC
- TMC_SAY_CURRENT(Y);
- #endif
- #if Y2_IS_TRINAMIC
- TMC_SAY_CURRENT(Y2);
- #endif
- break;
- case Z_AXIS:
- #if Z_IS_TRINAMIC
- TMC_SAY_CURRENT(Z);
- #endif
- #if Z2_IS_TRINAMIC
- TMC_SAY_CURRENT(Z2);
- #endif
- break;
- case E_AXIS:
- #if E0_IS_TRINAMIC
- TMC_SAY_CURRENT(E0);
- #endif
- #if E1_IS_TRINAMIC
- TMC_SAY_CURRENT(E1);
- #endif
- #if E2_IS_TRINAMIC
- TMC_SAY_CURRENT(E2);
- #endif
- #if E3_IS_TRINAMIC
- TMC_SAY_CURRENT(E3);
- #endif
- #if E4_IS_TRINAMIC
- TMC_SAY_CURRENT(E4);
- #endif
- break;
+ if (report) {
+ #if AXIS_IS_TMC(X)
+ TMC_SAY_CURRENT(X);
+ #endif
+ #if AXIS_IS_TMC(X2)
+ TMC_SAY_CURRENT(X2);
+ #endif
+ #if AXIS_IS_TMC(Y)
+ TMC_SAY_CURRENT(Y);
+ #endif
+ #if AXIS_IS_TMC(Y2)
+ TMC_SAY_CURRENT(Y2);
+ #endif
+ #if AXIS_IS_TMC(Z)
+ TMC_SAY_CURRENT(Z);
+ #endif
+ #if AXIS_IS_TMC(Z2)
+ TMC_SAY_CURRENT(Z2);
+ #endif
+ #if AXIS_IS_TMC(E0)
+ TMC_SAY_CURRENT(E0);
+ #endif
+ #if AXIS_IS_TMC(E1)
+ TMC_SAY_CURRENT(E1);
+ #endif
+ #if AXIS_IS_TMC(E2)
+ TMC_SAY_CURRENT(E2);
+ #endif
+ #if AXIS_IS_TMC(E3)
+ TMC_SAY_CURRENT(E3);
+ #endif
+ #if AXIS_IS_TMC(E4)
+ TMC_SAY_CURRENT(E4);
+ #endif
}
}
diff --git a/Marlin/src/gcode/feature/trinamic/M911-M915.cpp b/Marlin/src/gcode/feature/trinamic/M911-M915.cpp
index c86b59fa6cd1..6ba9ee5e99a4 100644
--- a/Marlin/src/gcode/feature/trinamic/M911-M915.cpp
+++ b/Marlin/src/gcode/feature/trinamic/M911-M915.cpp
@@ -30,49 +30,116 @@
#include "../../../module/planner.h"
#include "../../queue.h"
+#define M91x_USE(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || (AXIS_DRIVER_TYPE(ST, TMC2208) && PIN_EXISTS(ST##_SERIAL_RX)))
+#define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N))
+
/**
* M911: Report TMC stepper driver overtemperature pre-warn flag
- * The flag is held by the library and persist until manually cleared by M912
+ * This flag is held by the library, persisting until cleared by M912
*/
void GcodeSuite::M911() {
- #if ENABLED(X_IS_TMC2130) || (ENABLED(X_IS_TMC2208) && PIN_EXISTS(X_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ #if M91x_USE(X)
tmc_report_otpw(stepperX, TMC_X);
#endif
- #if ENABLED(Y_IS_TMC2130) || (ENABLED(Y_IS_TMC2208) && PIN_EXISTS(Y_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ #if M91x_USE(X2)
+ tmc_report_otpw(stepperX2, TMC_X2);
+ #endif
+ #if M91x_USE(Y)
tmc_report_otpw(stepperY, TMC_Y);
#endif
- #if ENABLED(Z_IS_TMC2130) || (ENABLED(Z_IS_TMC2208) && PIN_EXISTS(Z_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ #if M91x_USE(Y2)
+ tmc_report_otpw(stepperY2, TMC_Y2);
+ #endif
+ #if M91x_USE(Z)
tmc_report_otpw(stepperZ, TMC_Z);
#endif
- #if ENABLED(E0_IS_TMC2130) || (ENABLED(E0_IS_TMC2208) && PIN_EXISTS(E0_SERIAL_RX)) || ENABLED(IS_TRAMS)
+ #if M91x_USE(Z2)
+ tmc_report_otpw(stepperZ2, TMC_Z2);
+ #endif
+ #if M91x_USE_E(0)
tmc_report_otpw(stepperE0, TMC_E0);
#endif
+ #if M91x_USE_E(1)
+ tmc_report_otpw(stepperE1, TMC_E1);
+ #endif
+ #if M91x_USE_E(2)
+ tmc_report_otpw(stepperE2, TMC_E2);
+ #endif
+ #if M91x_USE_E(3)
+ tmc_report_otpw(stepperE3, TMC_E3);
+ #endif
+ #if M91x_USE_E(4)
+ tmc_report_otpw(stepperE4, TMC_E4);
+ #endif
}
/**
* M912: Clear TMC stepper driver overtemperature pre-warn flag held by the library
+ * Specify one or more axes with X, Y, Z, X1, Y1, Z1, X2, Y2, Z2, and E[index].
+ * If no axes are given, clear all.
+ *
+ * Examples:
+ * M912 X ; clear X and X2
+ * M912 X1 ; clear X1 only
+ * M912 X2 ; clear X2 only
+ * M912 X E ; clear X, X2, and all E
+ * M912 E1 ; clear E1 only
*/
void GcodeSuite::M912() {
- const bool clearX = parser.seen(axis_codes[X_AXIS]), clearY = parser.seen(axis_codes[Y_AXIS]), clearZ = parser.seen(axis_codes[Z_AXIS]), clearE = parser.seen(axis_codes[E_AXIS]),
- clearAll = (!clearX && !clearY && !clearZ && !clearE) || (clearX && clearY && clearZ && clearE);
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) || (ENABLED(X_IS_TMC2208) && PIN_EXISTS(X_SERIAL_RX))
- if (clearX || clearAll) tmc_clear_otpw(stepperX, TMC_X);
- #endif
- #if ENABLED(X2_IS_TMC2130) || (ENABLED(X2_IS_TMC2208) && PIN_EXISTS(X_SERIAL_RX))
- if (clearX || clearAll) tmc_clear_otpw(stepperX, TMC_X);
- #endif
+ const bool hasX = parser.seen(axis_codes[X_AXIS]),
+ hasY = parser.seen(axis_codes[Y_AXIS]),
+ hasZ = parser.seen(axis_codes[Z_AXIS]),
+ hasE = parser.seen(axis_codes[E_AXIS]),
+ hasNone = !hasX && !hasY && !hasZ && !hasE;
- #if ENABLED(Y_IS_TMC2130) || (ENABLED(Y_IS_TMC2208) && PIN_EXISTS(Y_SERIAL_RX))
- if (clearY || clearAll) tmc_clear_otpw(stepperY, TMC_Y);
- #endif
+ #if M91x_USE(X) || M91x_USE(X2)
+ const uint8_t xval = parser.byteval(axis_codes[X_AXIS], 10);
+ #if M91x_USE(X)
+ if (hasNone || xval == 1 || (hasX && xval == 10)) tmc_clear_otpw(stepperX, TMC_X);
+ #endif
+ #if M91x_USE(X2)
+ if (hasNone || xval == 2 || (hasX && xval == 10)) tmc_clear_otpw(stepperX2, TMC_X2);
+ #endif
+ #endif
- #if ENABLED(Z_IS_TMC2130) || (ENABLED(Z_IS_TMC2208) && PIN_EXISTS(Z_SERIAL_RX))
- if (clearZ || clearAll) tmc_clear_otpw(stepperZ, TMC_Z);
- #endif
+ #if M91x_USE(Y) || M91x_USE(Y2)
+ const uint8_t yval = parser.byteval(axis_codes[Y_AXIS], 10);
+ #if M91x_USE(Y)
+ if (hasNone || yval == 1 || (hasY && yval == 10)) tmc_clear_otpw(stepperY, TMC_Y);
+ #endif
+ #if M91x_USE(Y2)
+ if (hasNone || yval == 2 || (hasY && yval == 10)) tmc_clear_otpw(stepperY2, TMC_Y2);
+ #endif
+ #endif
- #if ENABLED(E0_IS_TMC2130) || (ENABLED(E0_IS_TMC2208) && PIN_EXISTS(E0_SERIAL_RX))
- if (clearE || clearAll) tmc_clear_otpw(stepperE0, TMC_E0);
- #endif
+ #if M91x_USE(Z) || M91x_USE(Z2)
+ const uint8_t zval = parser.byteval(axis_codes[Z_AXIS], 10);
+ #if M91x_USE(Z)
+ if (hasNone || zval == 1 || (hasZ && zval == 10)) tmc_clear_otpw(stepperZ, TMC_Z);
+ #endif
+ #if M91x_USE(Z2)
+ if (hasNone || zval == 2 || (hasZ && zval == 10)) tmc_clear_otpw(stepperZ2, TMC_Z2);
+ #endif
+ #endif
+
+ #if M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4)
+ const uint8_t eval = parser.byteval(axis_codes[E_AXIS], 10);
+ #if M91x_USE_E(0)
+ if (hasNone || eval == 0 || (hasE && eval == 10)) tmc_clear_otpw(stepperE0, TMC_E0);
+ #endif
+ #if M91x_USE_E(1)
+ if (hasNone || eval == 1 || (hasE && eval == 10)) tmc_clear_otpw(stepperE1, TMC_E1);
+ #endif
+ #if M91x_USE_E(2)
+ if (hasNone || eval == 2 || (hasE && eval == 10)) tmc_clear_otpw(stepperE2, TMC_E2);
+ #endif
+ #if M91x_USE_E(3)
+ if (hasNone || eval == 3 || (hasE && eval == 10)) tmc_clear_otpw(stepperE3, TMC_E3);
+ #endif
+ #if M91x_USE_E(4)
+ if (hasNone || eval == 4 || (hasE && eval == 10)) tmc_clear_otpw(stepperE4, TMC_E4);
+ #endif
+ #endif
}
/**
@@ -80,10 +147,10 @@ void GcodeSuite::M912() {
*/
#if ENABLED(HYBRID_THRESHOLD)
void GcodeSuite::M913() {
- #define TMC_SAY_PWMTHRS(P,Q) tmc_get_pwmthrs(stepper##Q, TMC_##Q, planner.axis_steps_per_mm[P##_AXIS])
- #define TMC_SET_PWMTHRS(P,Q) tmc_set_pwmthrs(stepper##Q, TMC_##Q, value, planner.axis_steps_per_mm[P##_AXIS])
+ #define TMC_SAY_PWMTHRS(A,Q) tmc_get_pwmthrs(stepper##Q, TMC_##Q, planner.axis_steps_per_mm[_AXIS(A)])
+ #define TMC_SET_PWMTHRS(A,Q) tmc_set_pwmthrs(stepper##Q, value, planner.axis_steps_per_mm[_AXIS(A)])
#define TMC_SAY_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_get_pwmthrs(stepperE##E, TMC_E##E, planner.axis_steps_per_mm[E_AXIS_N]); }while(0)
- #define TMC_SET_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_set_pwmthrs(stepperE##E, TMC_E##E, value, planner.axis_steps_per_mm[E_AXIS_N]); }while(0)
+ #define TMC_SET_PWMTHRS_E(E) do{ const uint8_t extruder = E; tmc_set_pwmthrs(stepperE##E, value, planner.axis_steps_per_mm[E_AXIS_N]); }while(0)
bool report = true;
const uint8_t index = parser.byteval('I');
@@ -91,45 +158,45 @@ void GcodeSuite::M912() {
report = false;
switch (i) {
case X_AXIS:
- #if X_IS_TRINAMIC
- if (index == 0) TMC_SET_PWMTHRS(X,X);
+ #if AXIS_HAS_STEALTHCHOP(X)
+ if (index < 2) TMC_SET_PWMTHRS(X,X);
#endif
- #if X2_IS_TRINAMIC
- if (index == 1) TMC_SET_PWMTHRS(X,X2);
+ #if AXIS_HAS_STEALTHCHOP(X2)
+ if (!(index & 1)) TMC_SET_PWMTHRS(X,X2);
#endif
break;
case Y_AXIS:
- #if Y_IS_TRINAMIC
- if (index == 0) TMC_SET_PWMTHRS(Y,Y);
+ #if AXIS_HAS_STEALTHCHOP(Y)
+ if (index < 2) TMC_SET_PWMTHRS(Y,Y);
#endif
- #if Y2_IS_TRINAMIC
- if (index == 1) TMC_SET_PWMTHRS(Y,Y2);
+ #if AXIS_HAS_STEALTHCHOP(Y2)
+ if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2);
#endif
break;
case Z_AXIS:
- #if Z_IS_TRINAMIC
- if (index == 0) TMC_SET_PWMTHRS(Z,Z);
+ #if AXIS_HAS_STEALTHCHOP(Z)
+ if (index < 2) TMC_SET_PWMTHRS(Z,Z);
#endif
- #if Z2_IS_TRINAMIC
- if (index == 1) TMC_SET_PWMTHRS(Z,Z2);
+ #if AXIS_HAS_STEALTHCHOP(Z2)
+ if (!(index & 1)) TMC_SET_PWMTHRS(Z,Z2);
#endif
break;
case E_AXIS: {
if (get_target_extruder_from_command()) return;
switch (target_extruder) {
- #if E0_IS_TRINAMIC
+ #if AXIS_HAS_STEALTHCHOP(E0)
case 0: TMC_SET_PWMTHRS_E(0); break;
#endif
- #if E_STEPPERS > 1 && E1_IS_TRINAMIC
+ #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
case 1: TMC_SET_PWMTHRS_E(1); break;
#endif
- #if E_STEPPERS > 2 && E2_IS_TRINAMIC
+ #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2)
case 2: TMC_SET_PWMTHRS_E(2); break;
#endif
- #if E_STEPPERS > 3 && E3_IS_TRINAMIC
+ #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3)
case 3: TMC_SET_PWMTHRS_E(3); break;
#endif
- #if E_STEPPERS > 4 && E4_IS_TRINAMIC
+ #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4)
case 4: TMC_SET_PWMTHRS_E(4); break;
#endif
}
@@ -137,48 +204,40 @@ void GcodeSuite::M912() {
}
}
- if (report) LOOP_XYZE(i) switch (i) {
- case X_AXIS:
- #if X_IS_TRINAMIC
- TMC_SAY_PWMTHRS(X,X);
- #endif
- #if X2_IS_TRINAMIC
- TMC_SAY_PWMTHRS(X,X2);
- #endif
- break;
- case Y_AXIS:
- #if Y_IS_TRINAMIC
- TMC_SAY_PWMTHRS(Y,Y);
- #endif
- #if Y2_IS_TRINAMIC
- TMC_SAY_PWMTHRS(Y,Y2);
- #endif
- break;
- case Z_AXIS:
- #if Z_IS_TRINAMIC
- TMC_SAY_PWMTHRS(Z,Z);
- #endif
- #if Z2_IS_TRINAMIC
- TMC_SAY_PWMTHRS(Z,Z2);
- #endif
- break;
- case E_AXIS:
- #if E0_IS_TRINAMIC
- TMC_SAY_PWMTHRS_E(0);
- #endif
- #if E_STEPPERS > 1 && E1_IS_TRINAMIC
- TMC_SAY_PWMTHRS_E(1);
- #endif
- #if E_STEPPERS > 2 && E2_IS_TRINAMIC
- TMC_SAY_PWMTHRS_E(2);
- #endif
- #if E_STEPPERS > 3 && E3_IS_TRINAMIC
- TMC_SAY_PWMTHRS_E(3);
- #endif
- #if E_STEPPERS > 4 && E4_IS_TRINAMIC
- TMC_SAY_PWMTHRS_E(4);
- #endif
- break;
+ if (report) {
+ #if AXIS_HAS_STEALTHCHOP(X)
+ TMC_SAY_PWMTHRS(X,X);
+ #endif
+ #if AXIS_HAS_STEALTHCHOP(X2)
+ TMC_SAY_PWMTHRS(X,X2);
+ #endif
+ #if AXIS_HAS_STEALTHCHOP(Y)
+ TMC_SAY_PWMTHRS(Y,Y);
+ #endif
+ #if AXIS_HAS_STEALTHCHOP(Y2)
+ TMC_SAY_PWMTHRS(Y,Y2);
+ #endif
+ #if AXIS_HAS_STEALTHCHOP(Z)
+ TMC_SAY_PWMTHRS(Z,Z);
+ #endif
+ #if AXIS_HAS_STEALTHCHOP(Z2)
+ TMC_SAY_PWMTHRS(Z,Z2);
+ #endif
+ #if AXIS_HAS_STEALTHCHOP(E0)
+ TMC_SAY_PWMTHRS_E(0);
+ #endif
+ #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1)
+ TMC_SAY_PWMTHRS_E(1);
+ #endif
+ #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2)
+ TMC_SAY_PWMTHRS_E(2);
+ #endif
+ #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3)
+ TMC_SAY_PWMTHRS_E(3);
+ #endif
+ #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4)
+ TMC_SAY_PWMTHRS_E(4);
+ #endif
}
}
#endif // HYBRID_THRESHOLD
@@ -189,66 +248,72 @@ void GcodeSuite::M912() {
#if ENABLED(SENSORLESS_HOMING)
void GcodeSuite::M914() {
#define TMC_SAY_SGT(Q) tmc_get_sgt(stepper##Q, TMC_##Q)
- #define TMC_SET_SGT(Q) tmc_set_sgt(stepper##Q, TMC_##Q, value)
+ #define TMC_SET_SGT(Q) tmc_set_sgt(stepper##Q, value)
bool report = true;
const uint8_t index = parser.byteval('I');
LOOP_XYZ(i) if (parser.seen(axis_codes[i])) {
- const int8_t value = (int8_t)constrain(parser.value_int(), -63, 64);
+ const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63);
report = false;
switch (i) {
- case X_AXIS:
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
- if (index == 0) TMC_SET_SGT(X);
- #endif
- #if ENABLED(X2_IS_TMC2130)
- if (index == 1) TMC_SET_SGT(X2);
- #endif
- break;
- case Y_AXIS:
- #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
- if (index == 0) TMC_SET_SGT(Y);
- #endif
- #if ENABLED(Y2_IS_TMC2130)
- if (index == 1) TMC_SET_SGT(Y2);
- #endif
- break;
- case Z_AXIS:
- #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
- if (index == 0) TMC_SET_SGT(Z);
- #endif
- #if ENABLED(Z2_IS_TMC2130)
- if (index == 1) TMC_SET_SGT(Z2);
- #endif
- break;
+ #if X_SENSORLESS
+ case X_AXIS:
+ #if AXIS_HAS_STALLGUARD(X)
+ if (index < 2) TMC_SET_SGT(X);
+ #endif
+ #if AXIS_HAS_STALLGUARD(X2)
+ if (!(index & 1)) TMC_SET_SGT(X2);
+ #endif
+ break;
+ #endif
+ #if Y_SENSORLESS
+ case Y_AXIS:
+ #if AXIS_HAS_STALLGUARD(Y)
+ if (index < 2) TMC_SET_SGT(Y);
+ #endif
+ #if AXIS_HAS_STALLGUARD(Y2)
+ if (!(index & 1)) TMC_SET_SGT(Y2);
+ #endif
+ break;
+ #endif
+ #if Z_SENSORLESS
+ case Z_AXIS:
+ #if AXIS_HAS_STALLGUARD(Z)
+ if (index < 2) TMC_SET_SGT(Z);
+ #endif
+ #if AXIS_HAS_STALLGUARD(Z2)
+ if (!(index & 1)) TMC_SET_SGT(Z2);
+ #endif
+ break;
+ #endif
}
}
- if (report) LOOP_XYZ(i) switch (i) {
- case X_AXIS:
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
+ if (report) {
+ #if X_SENSORLESS
+ #if AXIS_HAS_STALLGUARD(X)
TMC_SAY_SGT(X);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if AXIS_HAS_STALLGUARD(X2)
TMC_SAY_SGT(X2);
#endif
- break;
- case Y_AXIS:
- #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #endif
+ #if Y_SENSORLESS
+ #if AXIS_HAS_STALLGUARD(Y)
TMC_SAY_SGT(Y);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if AXIS_HAS_STALLGUARD(Y2)
TMC_SAY_SGT(Y2);
#endif
- break;
- case Z_AXIS:
- #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #endif
+ #if Z_SENSORLESS
+ #if AXIS_HAS_STALLGUARD(Z)
TMC_SAY_SGT(Z);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if AXIS_HAS_STALLGUARD(Z2)
TMC_SAY_SGT(Z2);
#endif
- break;
+ #endif
}
}
#endif // SENSORLESS_HOMING
@@ -261,16 +326,16 @@ void GcodeSuite::M912() {
const uint16_t _rms = parser.seenval('S') ? parser.value_int() : CALIBRATION_CURRENT,
_z = parser.seenval('Z') ? parser.value_linear_units() : CALIBRATION_EXTRA_HEIGHT;
- if (!axis_known_position[Z_AXIS]) {
+ if (!TEST(axis_known_position, Z_AXIS)) {
SERIAL_ECHOLNPGM("\nPlease home Z axis first");
return;
}
- #if Z_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z)
const uint16_t Z_current_1 = stepperZ.getCurrent();
stepperZ.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
#endif
- #if Z2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z2)
const uint16_t Z2_current_1 = stepperZ2.getCurrent();
stepperZ2.setCurrent(_rms, R_SENSE, HOLD_MULTIPLIER);
#endif
@@ -281,10 +346,10 @@ void GcodeSuite::M912() {
do_blocking_move_to_z(Z_MAX_POS+_z);
- #if Z_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z)
stepperZ.setCurrent(Z_current_1, R_SENSE, HOLD_MULTIPLIER);
#endif
- #if Z2_IS_TRINAMIC
+ #if AXIS_IS_TMC(Z2)
stepperZ2.setCurrent(Z2_current_1, R_SENSE, HOLD_MULTIPLIER);
#endif
diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp
index a218baf86440..4708e4cfe968 100644
--- a/Marlin/src/gcode/gcode.cpp
+++ b/Marlin/src/gcode/gcode.cpp
@@ -103,7 +103,7 @@ void GcodeSuite::get_destination_from_command() {
destination[i] = current_position[i];
}
- if (parser.linearval('F') > 0.0)
+ if (parser.linearval('F') > 0)
feedrate_mm_s = MMM_TO_MMS(parser.value_feedrate());
#if ENABLED(PRINTCOUNTER)
@@ -125,6 +125,47 @@ void GcodeSuite::dwell(millis_t time) {
while (PENDING(millis(), time)) idle();
}
+/**
+ * When G29_RETRY_AND_RECOVER is enabled, call G29() in
+ * a loop with recovery and retry handling.
+ */
+#if HAS_LEVELING && ENABLED(G29_RETRY_AND_RECOVER)
+
+ #ifndef G29_MAX_RETRIES
+ #define G29_MAX_RETRIES 0
+ #endif
+
+ void GcodeSuite::G29_with_retry() {
+ uint8_t retries = G29_MAX_RETRIES;
+ while (G29()) { // G29 should return true for failed probes ONLY
+ if (retries--) {
+ #ifdef G29_ACTION_ON_RECOVER
+ SERIAL_ECHOLNPGM("//action:" G29_ACTION_ON_RECOVER);
+ #endif
+ #ifdef G29_RECOVER_COMMANDS
+ process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
+ #endif
+ }
+ else {
+ #ifdef G29_FAILURE_COMMANDS
+ process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
+ #endif
+ #ifdef G29_ACTION_ON_FAILURE
+ SERIAL_ECHOLNPGM("//action:" G29_ACTION_ON_FAILURE);
+ #endif
+ #if ENABLED(G29_HALT_ON_FAILURE)
+ kill(PSTR(MSG_ERR_PROBING_FAILED));
+ #endif
+ return;
+ }
+ }
+ #ifdef G29_SUCCESS_COMMANDS
+ process_subcommands_now_P(PSTR(G29_SUCCESS_COMMANDS));
+ #endif
+ }
+
+#endif // HAS_LEVELING && G29_RETRY_AND_RECOVER
+
//
// Placeholders for non-migrated codes
//
@@ -135,527 +176,442 @@ void GcodeSuite::dwell(millis_t time) {
/**
* Process the parsed command and dispatch it to its handler
*/
-void GcodeSuite::process_parsed_command() {
+void GcodeSuite::process_parsed_command(
+ #if ENABLED(USE_EXECUTE_COMMANDS_IMMEDIATE)
+ const bool no_ok
+ #endif
+) {
KEEPALIVE_STATE(IN_HANDLER);
// Handle a known G, M, or T
switch (parser.command_letter) {
case 'G': switch (parser.codenum) {
- // G0, G1
- case 0:
- case 1:
- #if IS_SCARA
- G0_G1(parser.codenum == 0);
- #else
- G0_G1();
- #endif
- break;
+ case 0: case 1: G0_G1( // G0: Fast Move, G1: Linear Move
+ #if IS_SCARA
+ parser.codenum == 0
+ #endif
+ );
+ break;
- // G2, G3
#if ENABLED(ARC_SUPPORT) && DISABLED(SCARA)
- case 2: // G2: CW ARC
- case 3: // G3: CCW ARC
- G2_G3(parser.codenum == 2);
- break;
+ case 2: case 3: G2_G3(parser.codenum == 2); break; // G2: CW ARC, G3: CCW ARC
#endif
- // G4 Dwell
- case 4:
- G4();
- break;
+ case 4: G4(); break; // G4: Dwell
#if ENABLED(BEZIER_CURVE_SUPPORT)
- case 5: // G5: Cubic B_spline
- G5();
- break;
- #endif // BEZIER_CURVE_SUPPORT
+ case 5: G5(); break; // G5: Cubic B_spline
+ #endif
#if ENABLED(FWRETRACT)
- case 10: // G10: retract
- G10();
- break;
- case 11: // G11: retract_recover
- G11();
- break;
- #endif // FWRETRACT
+ case 10: G10(); break; // G10: Retract / Swap Retract
+ case 11: G11(); break; // G11: Recover / Swap Recover
+ #endif
#if ENABLED(NOZZLE_CLEAN_FEATURE)
- case 12:
- G12(); // G12: Nozzle Clean
- break;
- #endif // NOZZLE_CLEAN_FEATURE
+ case 12: G12(); break; // G12: Nozzle Clean
+ #endif
#if ENABLED(CNC_WORKSPACE_PLANES)
- case 17: // G17: Select Plane XY
- G17();
- break;
- case 18: // G18: Select Plane ZX
- G18();
- break;
- case 19: // G19: Select Plane YZ
- G19();
- break;
- #endif // CNC_WORKSPACE_PLANES
+ case 17: G17(); break; // G17: Select Plane XY
+ case 18: G18(); break; // G18: Select Plane ZX
+ case 19: G19(); break; // G19: Select Plane YZ
+ #endif
#if ENABLED(INCH_MODE_SUPPORT)
- case 20: // G20: Inch Mode
- G20();
- break;
-
- case 21: // G21: MM Mode
- G21();
- break;
- #endif // INCH_MODE_SUPPORT
+ case 20: G20(); break; // G20: Inch Mode
+ case 21: G21(); break; // G21: MM Mode
+ #endif
#if ENABLED(G26_MESH_VALIDATION)
- case 26: // G26: Mesh Validation Pattern generation
- G26();
- break;
- #endif // AUTO_BED_LEVELING_UBL
+ case 26: G26(); break; // G26: Mesh Validation Pattern generation
+ #endif
#if ENABLED(NOZZLE_PARK_FEATURE)
- case 27: // G27: Nozzle Park
- G27();
- break;
- #endif // NOZZLE_PARK_FEATURE
+ case 27: G27(); break; // G27: Nozzle Park
+ #endif
- case 28: // G28: Home all axes, one at a time
- G28(false);
- break;
+ case 28: G28(false); break; // G28: Home all axes, one at a time
#if HAS_LEVELING
- case 29: // G29 Detailed Z probe, probes the bed at 3 or more points,
- // or provides access to the UBL System if enabled.
- G29();
+ case 29: // G29: Bed leveling calibration
+ #if ENABLED(G29_RETRY_AND_RECOVER)
+ G29_with_retry();
+ #else
+ G29();
+ #endif
break;
#endif // HAS_LEVELING
#if HAS_BED_PROBE
-
- case 30: // G30 Single Z probe
- G30();
- break;
-
+ case 30: G30(); break; // G30: Single Z probe
#if ENABLED(Z_PROBE_SLED)
-
- case 31: // G31: dock the sled
- G31();
- break;
-
- case 32: // G32: undock the sled
- G32();
- break;
-
- #endif // Z_PROBE_SLED
-
- #endif // HAS_BED_PROBE
+ case 31: G31(); break; // G31: dock the sled
+ case 32: G32(); break; // G32: undock the sled
+ #endif
+ #endif
#if ENABLED(DELTA_AUTO_CALIBRATION)
- case 33: // G33: Delta Auto-Calibration
- G33();
- break;
- #endif // DELTA_AUTO_CALIBRATION
+ case 33: G33(); break; // G33: Delta Auto-Calibration
+ #endif
#if ENABLED(G38_PROBE_TARGET)
- case 38: // G38.2 & G38.3
+ case 38: // G38.2 & G38.3
if (parser.subcode == 2 || parser.subcode == 3)
G38(parser.subcode == 2);
break;
#endif
- case 90: // G90
- relative_mode = false;
- break;
- case 91: // G91
- relative_mode = true;
- break;
+ case 90: relative_mode = false; break; // G90: Relative Mode
+ case 91: relative_mode = true; break; // G91: Absolute Mode
- case 92: // G92 - Set current axis position(s)
- G92();
- break;
+ case 92: G92(); break; // G92: Set current axis position(s)
#if HAS_MESH
- case 42: G42(); break; // G42: Coordinated move to a mesh point
+ case 42: G42(); break; // G42: Coordinated move to a mesh point
#endif
#if ENABLED(DEBUG_GCODE_PARSER)
- case 800:
- parser.debug(); // GCode Parser Test for G
- break;
+ case 800: parser.debug(); break; // G800: GCode Parser Test for G
#endif
+
+ default: parser.unknown_command_error(); break;
}
break;
case 'M': switch (parser.codenum) {
#if HAS_RESUME_CONTINUE
- case 0: // M0: Unconditional stop - Wait for user button press on LCD
- case 1: // M1: Conditional stop - Wait for user button press on LCD
- M0_M1();
- break;
- #endif // ULTIPANEL
+ case 0: // M0: Unconditional stop - Wait for user button press on LCD
+ case 1: M0_M1(); break; // M1: Conditional stop - Wait for user button press on LCD
+ #endif
#if ENABLED(SPINDLE_LASER_ENABLE)
- // These synchronize with movement commands...
- case 3: M3_M4(true ); break; // M3: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CW
- case 4: M3_M4(false); break; // M4: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CCW
- case 5: M5(); break; // M5 - turn spindle/laser off
+ case 3: M3_M4(true ); break; // M3: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CW
+ case 4: M3_M4(false); break; // M4: turn spindle/laser on, set laser/spindle power/speed, set rotation direction CCW
+ case 5: M5(); break; // M5 - turn spindle/laser off
#endif
- case 17: // M17: Enable all stepper motors
- M17();
- break;
+ case 17: M17(); break; // M17: Enable all stepper motors
#if ENABLED(SDSUPPORT)
- case 20: M20(); break; // M20: list SD card
- case 21: M21(); break; // M21: init SD card
- case 22: M22(); break; // M22: release SD card
- case 23: M23(); break; // M23: Select file
- case 24: M24(); break; // M24: Start SD print
- case 25: M25(); break; // M25: Pause SD print
- case 26: M26(); break; // M26: Set SD index
- case 27: M27(); break; // M27: Get SD status
- case 28: M28(); break; // M28: Start SD write
- case 29: M29(); break; // M29: Stop SD write
- case 30: M30(); break; // M30 Delete File
- case 32: M32(); break; // M32: Select file and start SD print
+ case 20: M20(); break; // M20: list SD card
+ case 21: M21(); break; // M21: init SD card
+ case 22: M22(); break; // M22: release SD card
+ case 23: M23(); break; // M23: Select file
+ case 24: M24(); break; // M24: Start SD print
+ case 25: M25(); break; // M25: Pause SD print
+ case 26: M26(); break; // M26: Set SD index
+ case 27: M27(); break; // M27: Get SD status
+ case 28: M28(); break; // M28: Start SD write
+ case 29: M29(); break; // M29: Stop SD write
+ case 30: M30(); break; // M30 Delete File
+ case 32: M32(); break; // M32: Select file and start SD print
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
- case 33: M33(); break; // M33: Get the long full path to a file or folder
+ case 33: M33(); break; // M33: Get the long full path to a file or folder
#endif
#if ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_GCODE)
- case 34: M34(); break; // M34: Set SD card sorting options
+ case 34: M34(); break; // M34: Set SD card sorting options
#endif
- case 928: M928(); break; // M928: Start SD write
+ case 928: M928(); break; // M928: Start SD write
#endif // SDSUPPORT
- case 31: M31(); break; // M31: Report time since the start of SD print or last M109
-
- case 42: M42(); break; // M42: Change pin state
+ case 31: M31(); break; // M31: Report time since the start of SD print or last M109
+ case 42: M42(); break; // M42: Change pin state
#if ENABLED(PINS_DEBUGGING)
- case 43: M43(); break; // M43: Read pin state
+ case 43: M43(); break; // M43: Read pin state
#endif
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
- case 48: M48(); break; // M48: Z probe repeatability test
+ case 48: M48(); break; // M48: Z probe repeatability test
#endif
#if ENABLED(G26_MESH_VALIDATION)
- case 49: M49(); break; // M49: Turn on or off G26 debug flag for verbose output
+ case 49: M49(); break; // M49: Turn on or off G26 debug flag for verbose output
#endif
#if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY)
- case 73: M73(); break; // M73: Set progress percentage (for display on LCD)
+ case 73: M73(); break; // M73: Set progress percentage (for display on LCD)
#endif
- case 75: M75(); break; // M75: Start print timer
- case 76: M76(); break; // M76: Pause print timer
- case 77: M77(); break; // M77: Stop print timer
+ case 75: M75(); break; // M75: Start print timer
+ case 76: M76(); break; // M76: Pause print timer
+ case 77: M77(); break; // M77: Stop print timer
#if ENABLED(PRINTCOUNTER)
- case 78: M78(); break; // M78: Show print statistics
+ case 78: M78(); break; // M78: Show print statistics
#endif
#if ENABLED(M100_FREE_MEMORY_WATCHER)
- case 100: M100(); break; // M100: Free Memory Report
+ case 100: M100(); break; // M100: Free Memory Report
#endif
- case 104: M104(); break; // M104: Set hot end temperature
- case 109: M109(); break; // M109: Wait for hotend temperature to reach target
-
- case 110: M110(); break; // M110: Set Current Line Number
-
- case 111: M111(); break; // M111: Set debug level
+ case 104: M104(); break; // M104: Set hot end temperature
+ case 109: M109(); break; // M109: Wait for hotend temperature to reach target
+ case 110: M110(); break; // M110: Set Current Line Number
+ case 111: M111(); break; // M111: Set debug level
#if DISABLED(EMERGENCY_PARSER)
- case 108: M108(); break; // M108: Cancel Waiting
- case 112: M112(); break; // M112: Emergency Stop
- case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
+ case 108: M108(); break; // M108: Cancel Waiting
+ case 112: M112(); break; // M112: Emergency Stop
+ case 410: M410(); break; // M410: Quickstop - Abort all the planned moves.
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
- case 113: M113(); break; // M113: Set Host Keepalive interval
+ case 113: M113(); break; // M113: Set Host Keepalive interval
#endif
- #if HAS_HEATER_BED && HAS_TEMP_BED
- case 140: M140(); break; // M140: Set bed temperature
- case 190: M190(); break; // M190: Wait for bed temperature to reach target
+ #if HAS_HEATED_BED
+ case 140: M140(); break; // M140: Set bed temperature
+ case 190: M190(); break; // M190: Wait for bed temperature to reach target
#endif
- case 105: // M105: Report current temperature
- M105();
- KEEPALIVE_STATE(NOT_BUSY);
- return; // "ok" already printed
+ case 105: M105(); KEEPALIVE_STATE(NOT_BUSY); return; // M105: Report Temperatures (and say "ok")
#if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
- case 155: M155(); break; // M155: Set temperature auto-report interval
+ case 155: M155(); break; // M155: Set temperature auto-report interval
#endif
#if FAN_COUNT > 0
- case 106: M106(); break; // M106: Fan On
- case 107: M107(); break; // M107: Fan Off
+ case 106: M106(); break; // M106: Fan On
+ case 107: M107(); break; // M107: Fan Off
#endif
#if ENABLED(PARK_HEAD_ON_PAUSE)
- case 125: M125(); break; // M125: Store current position and move to filament change position
+ case 125: M125(); break; // M125: Store current position and move to filament change position
#endif
#if ENABLED(BARICUDA)
// PWM for HEATER_1_PIN
#if HAS_HEATER_1
- case 126: M126(); break; // M126: valve open
- case 127: M127(); break; // M127: valve closed
+ case 126: M126(); break; // M126: valve open
+ case 127: M127(); break; // M127: valve closed
#endif
// PWM for HEATER_2_PIN
#if HAS_HEATER_2
- case 128: M128(); break; // M128: valve open
- case 129: M129(); break; // M129: valve closed
+ case 128: M128(); break; // M128: valve open
+ case 129: M129(); break; // M129: valve closed
#endif
#endif // BARICUDA
#if HAS_POWER_SWITCH
- case 80: M80(); break; // M80: Turn on Power Supply
- #endif
-
- case 81: M81(); break; // M81: Turn off Power, including Power Supply, if possible
-
- case 82: M82(); break; // M82: Set E axis normal mode (same as other axes)
- case 83: M83(); break; // M83: Set E axis relative mode
-
- case 18: // M18 => M84
- case 84: M18_M84(); break; // M84: Disable all steppers or set timeout
- case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout
-
- case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
-
- case 114: M114(); break; // M114: Report current position
-
- case 115: M115(); break; // M115: Report capabilities
-
- case 117: M117(); break; // M117: Set LCD message text, if possible
- case 118: M118(); break; // M118: Display a message in the host console
-
- case 119: M119(); break; // M119: Report endstop states
- case 120: M120(); break; // M120: Enable endstops
- case 121: M121(); break; // M121: Disable endstops
+ case 80: M80(); break; // M80: Turn on Power Supply
+ #endif
+ case 81: M81(); break; // M81: Turn off Power, including Power Supply, if possible
+
+ case 82: M82(); break; // M82: Set E axis normal mode (same as other axes)
+ case 83: M83(); break; // M83: Set E axis relative mode
+ case 18: case 84: M18_M84(); break; // M18/M84: Disable Steppers / Set Timeout
+ case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout
+ case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
+ case 114: M114(); break; // M114: Report current position
+ case 115: M115(); break; // M115: Report capabilities
+ case 117: M117(); break; // M117: Set LCD message text, if possible
+ case 118: M118(); break; // M118: Display a message in the host console
+ case 119: M119(); break; // M119: Report endstop states
+ case 120: M120(); break; // M120: Enable endstops
+ case 121: M121(); break; // M121: Disable endstops
#if ENABLED(ULTIPANEL)
- case 145: M145(); break; // M145: Set material heatup parameters
+ case 145: M145(); break; // M145: Set material heatup parameters
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
- case 149: M149(); break; // M149: Set temperature units
+ case 149: M149(); break; // M149: Set temperature units
#endif
#if HAS_COLOR_LEDS
- case 150: M150(); break; // M150: Set Status LED Color
+ case 150: M150(); break; // M150: Set Status LED Color
#endif
#if ENABLED(MIXING_EXTRUDER)
- case 163: M163(); break; // M163: Set a component weight for mixing extruder
+ case 163: M163(); break; // M163: Set a component weight for mixing extruder
#if MIXING_VIRTUAL_TOOLS > 1
- case 164: M164(); break; // M164: Save current mix as a virtual extruder
+ case 164: M164(); break; // M164: Save current mix as a virtual extruder
#endif
#if ENABLED(DIRECT_MIXING_IN_G1)
- case 165: M165(); break; // M165: Set multiple mix weights
+ case 165: M165(); break; // M165: Set multiple mix weights
#endif
#endif
#if DISABLED(NO_VOLUMETRICS)
- case 200: M200(); break; // M200: Set filament diameter, E to cubic units
+ case 200: M200(); break; // M200: Set filament diameter, E to cubic units
#endif
- case 201: M201(); break; // M201: Set max acceleration for print moves (units/s^2)
+ case 201: M201(); break; // M201: Set max acceleration for print moves (units/s^2)
#if 0
- case 202: M202(); break; // Not used for Sprinter/grbl gen6
+ case 202: M202(); break; // M202: Not used for Sprinter/grbl gen6
#endif
- case 203: M203(); break; // M203: Set max feedrate (units/sec)
- case 204: M204(); break; // M204: Set acceleration
- case 205: M205(); break; // M205: Set advanced settings
+ case 203: M203(); break; // M203: Set max feedrate (units/sec)
+ case 204: M204(); break; // M204: Set acceleration
+ case 205: M205(); break; // M205: Set advanced settings
#if HAS_M206_COMMAND
- case 206: M206(); break; // M206: Set home offsets
+ case 206: M206(); break; // M206: Set home offsets
#endif
#if ENABLED(DELTA)
- case 665: M665(); break; // M665: Set delta configurations
+ case 665: M665(); break; // M665: Set delta configurations
#endif
#if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
- case 666: M666(); break; // M666: Set delta or dual endstop adjustment
+ case 666: M666(); break; // M666: Set delta or dual endstop adjustment
#endif
#if ENABLED(FWRETRACT)
- case 207: M207(); break; // M207: Set Retract Length, Feedrate, and Z lift
- case 208: M208(); break; // M208: Set Recover (unretract) Additional Length and Feedrate
- case 209: if (MIN_AUTORETRACT <= MAX_AUTORETRACT) M209(); break; // M209: Turn Automatic Retract Detection on/off
+ case 207: M207(); break; // M207: Set Retract Length, Feedrate, and Z lift
+ case 208: M208(); break; // M208: Set Recover (unretract) Additional Length and Feedrate
+ case 209:
+ if (MIN_AUTORETRACT <= MAX_AUTORETRACT) M209(); // M209: Turn Automatic Retract Detection on/off
+ break;
#endif
- case 211: M211(); break; // M211: Enable, Disable, and/or Report software endstops
+ case 211: M211(); break; // M211: Enable, Disable, and/or Report software endstops
#if HOTENDS > 1
- case 218: // M218: Set a tool offset
- M218();
- break;
+ case 218: M218(); break; // M218: Set a tool offset
#endif
- case 220: M220(); break; // M220: Set Feedrate Percentage: S ("FR" on your LCD)
-
- case 221: // M221: Set Flow Percentage
- M221();
- break;
-
- case 226: M226(); break; // M226: Wait until a pin reaches a state
+ case 220: M220(); break; // M220: Set Feedrate Percentage: S ("FR" on your LCD)
+ case 221: M221(); break; // M221: Set Flow Percentage
+ case 226: M226(); break; // M226: Wait until a pin reaches a state
#if HAS_SERVOS
- case 280: M280(); break; // M280: Set servo position absolute
+ case 280: M280(); break; // M280: Set servo position absolute
#endif
#if ENABLED(BABYSTEPPING)
- case 290: M290(); break; // M290: Babystepping
+ case 290: M290(); break; // M290: Babystepping
#endif
#if HAS_BUZZER
- case 300: M300(); break; // M300: Play beep tone
+ case 300: M300(); break; // M300: Play beep tone
#endif
#if ENABLED(PIDTEMP)
- case 301: M301(); break; // M301: Set hotend PID parameters
+ case 301: M301(); break; // M301: Set hotend PID parameters
#endif
#if ENABLED(PIDTEMPBED)
- case 304: M304(); break; // M304: Set bed PID parameters
+ case 304: M304(); break; // M304: Set bed PID parameters
#endif
#if defined(CHDK) || HAS_PHOTOGRAPH
- case 240: M240(); break; // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
+ case 240: M240(); break; // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
#endif
#if HAS_LCD_CONTRAST
- case 250: M250(); break; // M250: Set LCD contrast
+ case 250: M250(); break; // M250: Set LCD contrast
#endif
#if ENABLED(EXPERIMENTAL_I2CBUS)
- case 260: M260(); break; // M260: Send data to an i2c slave
- case 261: M261(); break; // M261: Request data from an i2c slave
+ case 260: M260(); break; // M260: Send data to an i2c slave
+ case 261: M261(); break; // M261: Request data from an i2c slave
#endif
#if ENABLED(PREVENT_COLD_EXTRUSION)
- case 302: M302(); break; // M302: Allow cold extrudes (set the minimum extrude temperature)
+ case 302: M302(); break; // M302: Allow cold extrudes (set the minimum extrude temperature)
#endif
- case 303: // M303: PID autotune
- M303();
- break;
+ case 303: M303(); break; // M303: PID autotune
#if ENABLED(MORGAN_SCARA)
- case 360: if (M360()) return; break; // M360: SCARA Theta pos1
- case 361: if (M361()) return; break; // M361: SCARA Theta pos2
- case 362: if (M362()) return; break; // M362: SCARA Psi pos1
- case 363: if (M363()) return; break; // M363: SCARA Psi pos2
- case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
+ case 360: if (M360()) return; break; // M360: SCARA Theta pos1
+ case 361: if (M361()) return; break; // M361: SCARA Theta pos2
+ case 362: if (M362()) return; break; // M362: SCARA Psi pos1
+ case 363: if (M363()) return; break; // M363: SCARA Psi pos2
+ case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
#endif
#if ENABLED(EXT_SOLENOID)
- case 380: M380(); break; // M380: Activate solenoid on active extruder
- case 381: M381(); break; // M381: Disable all solenoids
+ case 380: M380(); break; // M380: Activate solenoid on active extruder
+ case 381: M381(); break; // M381: Disable all solenoids
#endif
- case 400: M400(); break; // M400: Finish all moves
+ case 400: M400(); break; // M400: Finish all moves
#if HAS_BED_PROBE
- case 401: M401(); break; // M401: Deploy probe
- case 402: M402(); break; // M402: Stow probe
+ case 401: M401(); break; // M401: Deploy probe
+ case 402: M402(); break; // M402: Stow probe
#endif
#if ENABLED(FILAMENT_WIDTH_SENSOR)
- case 404: // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
- M404();
- break;
- case 405: // M405: Turn on filament sensor for control
- M405();
- break;
- case 406: // M406: Turn off filament sensor for control
- M406();
- break;
- case 407: // M407: Display measured filament diameter
- M407();
- break;
- #endif // FILAMENT_WIDTH_SENSOR
+ case 404: M404(); break; // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
+ case 405: M405(); break; // M405: Turn on filament sensor for control
+ case 406: M406(); break; // M406: Turn off filament sensor for control
+ case 407: M407(); break; // M407: Display measured filament diameter
+ #endif
#if HAS_LEVELING
- case 420: // M420: Enable/Disable Bed Leveling
- M420();
- break;
+ case 420: M420(); break; // M420: Enable/Disable Bed Leveling
#endif
#if HAS_MESH
- case 421: // M421: Set a Mesh Bed Leveling Z coordinate
- M421();
- break;
+ case 421: M421(); break; // M421: Set a Mesh Bed Leveling Z coordinate
#endif
#if HAS_M206_COMMAND
- case 428: M428(); break; // M428: Apply current_position to home_offset
+ case 428: M428(); break; // M428: Apply current_position to home_offset
#endif
- case 500: M500(); break; // M500: Store settings in EEPROM
- case 501: M501(); break; // M501: Read settings from EEPROM
- case 502: M502(); break; // M502: Revert to default settings
+ case 500: M500(); break; // M500: Store settings in EEPROM
+ case 501: M501(); break; // M501: Read settings from EEPROM
+ case 502: M502(); break; // M502: Revert to default settings
#if DISABLED(DISABLE_M503)
- case 503: M503(); break; // M503: print settings currently in memory
+ case 503: M503(); break; // M503: print settings currently in memory
#endif
#if ENABLED(EEPROM_SETTINGS)
- case 504: M504(); break; // M504: Validate EEPROM contents
+ case 504: M504(); break; // M504: Validate EEPROM contents
#endif
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
- case 540: M540(); break; // M540: Set abort on endstop hit for SD printing
+ case 540: M540(); break; // M540: Set abort on endstop hit for SD printing
#endif
#if HAS_BED_PROBE
- case 851: // M851: Set Z Probe Z Offset
- M851();
- break;
- #endif // HAS_BED_PROBE
+ case 851: M851(); break; // M851: Set Z Probe Z Offset
+ #endif
#if ENABLED(SKEW_CORRECTION_GCODE)
- case 852: // M852: Set Skew factors
- M852();
- break;
+ case 852: M852(); break; // M852: Set Skew factors
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
- case 600: M600(); break; // M600: Pause for Filament Change
- case 603: M603(); break; // M603: Configure Filament Change
- #endif // ADVANCED_PAUSE_FEATURE
+ case 600: M600(); break; // M600: Pause for Filament Change
+ case 603: M603(); break; // M603: Configure Filament Change
+ #endif
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
- case 605: M605(); break; // M605: Set Dual X Carriage movement mode
+ case 605: M605(); break; // M605: Set Dual X Carriage movement mode
#endif
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
- case 701: M701(); break; // M701: Load Filament
- case 702: M702(); break; // M702: Unload Filament
+ case 701: M701(); break; // M701: Load Filament
+ case 702: M702(); break; // M702: Unload Filament
+ #endif
+
+ #if ENABLED(MAX7219_GCODE)
+ case 7219: M7219(); break; // M7219: Set LEDs, columns, and rows
#endif
#if ENABLED(LIN_ADVANCE)
- case 900: M900(); break; // M900: Set advance K factor.
+ case 900: M900(); break; // M900: Set advance K factor.
#endif
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || ENABLED(DIGIPOT_I2C) || ENABLED(DAC_STEPPER_CURRENT)
- case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
+ case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
#if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
- case 908: M908(); break; // M908: Control digital trimpot directly.
- #if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF
- case 909: M909(); break; // M909: Print digipot/DAC current value
- case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM
+ case 908: M908(); break; // M908: Control digital trimpot directly.
+ #if ENABLED(DAC_STEPPER_CURRENT)
+ case 909: M909(); break; // M909: Print digipot/DAC current value
+ case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM
#endif
#endif
#endif
@@ -664,58 +620,61 @@ void GcodeSuite::process_parsed_command() {
#if ENABLED(TMC_DEBUG)
case 122: M122(); break;
#endif
- case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E
- case 911: M911(); break; // M911: Report TMC2130 prewarn triggered flags
- case 912: M912(); break; // M912: Clear TMC2130 prewarn triggered flags
+ case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E
+ case 911: M911(); break; // M911: Report TMC2130 prewarn triggered flags
+ case 912: M912(); break; // M912: Clear TMC2130 prewarn triggered flags
#if ENABLED(HYBRID_THRESHOLD)
- case 913: M913(); break; // M913: Set HYBRID_THRESHOLD speed.
+ case 913: M913(); break; // M913: Set HYBRID_THRESHOLD speed.
#endif
#if ENABLED(SENSORLESS_HOMING)
- case 914: M914(); break; // M914: Set SENSORLESS_HOMING sensitivity.
+ case 914: M914(); break; // M914: Set SENSORLESS_HOMING sensitivity.
#endif
#if ENABLED(TMC_Z_CALIBRATION)
- case 915: M915(); break; // M915: TMC Z axis calibration.
+ case 915: M915(); break; // M915: TMC Z axis calibration.
#endif
#endif
#if HAS_MICROSTEPS
- case 350: M350(); break; // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
- case 351: M351(); break; // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
+ case 350: M350(); break; // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
+ case 351: M351(); break; // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
#endif
- case 355: M355(); break; // M355: Set case light brightness
+ case 355: M355(); break; // M355: Set case light brightness
#if ENABLED(DEBUG_GCODE_PARSER)
- case 800:
- parser.debug(); // GCode Parser Test for M
- break;
+ case 800: parser.debug(); break; // M800: GCode Parser Test for M
#endif
#if ENABLED(I2C_POSITION_ENCODERS)
- case 860: M860(); break; // M860: Report encoder module position
- case 861: M861(); break; // M861: Report encoder module status
- case 862: M862(); break; // M862: Perform axis test
- case 863: M863(); break; // M863: Calibrate steps/mm
- case 864: M864(); break; // M864: Change module address
- case 865: M865(); break; // M865: Check module firmware version
- case 866: M866(); break; // M866: Report axis error count
- case 867: M867(); break; // M867: Toggle error correction
- case 868: M868(); break; // M868: Set error correction threshold
- case 869: M869(); break; // M869: Report axis error
- #endif
-
- case 999: M999(); break; // M999: Restart after being Stopped
+ case 860: M860(); break; // M860: Report encoder module position
+ case 861: M861(); break; // M861: Report encoder module status
+ case 862: M862(); break; // M862: Perform axis test
+ case 863: M863(); break; // M863: Calibrate steps/mm
+ case 864: M864(); break; // M864: Change module address
+ case 865: M865(); break; // M865: Check module firmware version
+ case 866: M866(); break; // M866: Report axis error count
+ case 867: M867(); break; // M867: Toggle error correction
+ case 868: M868(); break; // M868: Set error correction threshold
+ case 869: M869(); break; // M869: Report axis error
+ #endif
+
+ case 999: M999(); break; // M999: Restart after being Stopped
+
+ default: parser.unknown_command_error(); break;
}
break;
- case 'T': T(parser.codenum); break; // Tn: Tool Change
+ case 'T': T(parser.codenum); break; // Tn: Tool Change
default: parser.unknown_command_error();
}
KEEPALIVE_STATE(NOT_BUSY);
- ok_to_send();
+ #if ENABLED(USE_EXECUTE_COMMANDS_IMMEDIATE)
+ if (!no_ok)
+ #endif
+ ok_to_send();
}
/**
@@ -734,13 +693,41 @@ void GcodeSuite::process_next_command() {
#endif
}
- reset_stepper_timeout(); // Keep steppers powered
-
// Parse the next command in the queue
parser.parse(current_command);
process_parsed_command();
}
+#if ENABLED(USE_EXECUTE_COMMANDS_IMMEDIATE)
+ /**
+ * Run a series of commands, bypassing the command queue to allow
+ * G-code "macros" to be called from within other G-code handlers.
+ */
+ void GcodeSuite::process_subcommands_now_P(const char *pgcode) {
+ // Save the parser state
+ char * const saved_cmd = parser.command_ptr;
+
+ // Process individual commands in string
+ while (pgm_read_byte_near(pgcode)) {
+ // Break up string at '\n' delimiters
+ const char *delim = strchr_P(pgcode, '\n');
+ size_t len = delim ? delim - pgcode : strlen_P(pgcode);
+ char cmd[len + 1];
+ strncpy_P(cmd, pgcode, len);
+ cmd[len] = '\0';
+ pgcode += len;
+ if (delim) pgcode++;
+
+ // Parse the next command in the string
+ parser.parse(cmd);
+ process_parsed_command(true);
+ }
+
+ // Restore the parser state
+ parser.parse(saved_cmd);
+ }
+#endif
+
#if ENABLED(HOST_KEEPALIVE_FEATURE)
/**
diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h
index eebcc4f23536..2130b1636e19 100644
--- a/Marlin/src/gcode/gcode.h
+++ b/Marlin/src/gcode/gcode.h
@@ -132,7 +132,7 @@
* M119 - Report endstops status.
* M120 - Enable endstops detection.
* M121 - Disable endstops detection.
- * M122 - Debug stepper (Requires HAVE_TMC2130 or HAVE_TMC2208)
+ * M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660)
* M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
* M126 - Solenoid Air Valve Open. (Requires BARICUDA)
* M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
@@ -192,7 +192,7 @@
* M407 - Display measured filament diameter in millimeters. (Requires FILAMENT_WIDTH_SENSOR)
* M410 - Quickstop. Abort all planned moves.
* M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
- * M421 - Set a single Z coordinate in the Mesh Leveling grid. X Y Z (Requires MESH_BED_LEVELING or AUTO_BED_LEVELING_UBL)
+ * M421 - Set a single Z coordinate in the Mesh Leveling grid. X Y Z (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL)
* M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
* M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
* M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
@@ -202,7 +202,7 @@
* M600 - Pause for filament change: "M600 X Y Z E L