Merge latest bugfix

master
Scott Lahteine 8 years ago
commit 17f8a494bf

10
.gitignore vendored

@ -52,6 +52,7 @@ tags
*.lo *.lo
*.o *.o
*.obj *.obj
*.ino.cpp
# Precompiled Headers # Precompiled Headers
*.gch *.gch
@ -116,9 +117,8 @@ tags
*.su *.su
# PlatformIO files/dirs # PlatformIO files/dirs
.pioenvs .pio*
.piolib lib/readme.txt
.piolibdeps
#Visual Studio #Visual Studio
*.sln *.sln
@ -132,3 +132,7 @@ Marlin/.vs/
#cmake #cmake
CMakeLists.txt CMakeLists.txt
Marlin/CMakeLists.txt Marlin/CMakeLists.txt
CMakeListsPrivate.txt
#CLion
cmake-build-*

@ -126,6 +126,7 @@ script:
# #
- restore_configs - restore_configs
- opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT FIX_MOUNTED_PROBE EEPROM_SETTINGS G3D_PANEL - opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT FIX_MOUNTED_PROBE EEPROM_SETTINGS G3D_PANEL
- opt_enable_adv CUSTOM_USER_MENUS
- build_marlin - build_marlin
# #
# Test a Sled Z Probe # Test a Sled Z Probe
@ -375,17 +376,17 @@ script:
- use_example_configs Hephestos_2 - use_example_configs Hephestos_2
- build_marlin - build_marlin
# #
# Delta Config (generic) # Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
- restore_configs - restore_configs
- use_example_configs delta/generic - use_example_configs delta/generic
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
- build_marlin - build_marlin
# #
# Delta Config (generic) + ABL + ALLEN_KEY # Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
# #
- use_example_configs delta/generic - use_example_configs delta/generic
- opt_disable DISABLE_MIN_ENDSTOPS - opt_disable DISABLE_MIN_ENDSTOPS
- opt_enable AUTO_BED_LEVELING_BILINEAR Z_PROBE_ALLEN_KEY - opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2
- build_marlin - build_marlin
# #
# Delta Config (FLSUN AC because it's complex) # Delta Config (FLSUN AC because it's complex)

@ -291,36 +291,34 @@
* TOOL_E_INDEX - Index to use when getting/setting the tool state * TOOL_E_INDEX - Index to use when getting/setting the tool state
* *
*/ */
#if ENABLED(SINGLENOZZLE) // One hotend, multi-extruder #if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
#define HOTENDS 1 #define HOTENDS 1
#define E_STEPPERS EXTRUDERS
#define E_MANUAL EXTRUDERS
#define TOOL_E_INDEX current_block->active_extruder
#undef TEMP_SENSOR_1_AS_REDUNDANT #undef TEMP_SENSOR_1_AS_REDUNDANT
#undef HOTEND_OFFSET_X #undef HOTEND_OFFSET_X
#undef HOTEND_OFFSET_Y #undef HOTEND_OFFSET_Y
#elif ENABLED(SWITCHING_EXTRUDER) // One E stepper, unified E axis, two hotends #else // Two hotends
#define HOTENDS EXTRUDERS #define HOTENDS EXTRUDERS
#define E_STEPPERS 1 #if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z)
#define E_MANUAL 1
#define TOOL_E_INDEX 0
#ifndef HOTEND_OFFSET_Z
#define HOTEND_OFFSET_Z { 0 } #define HOTEND_OFFSET_Z { 0 }
#endif #endif
#elif ENABLED(MIXING_EXTRUDER) // Multi-stepper, unified E axis, one hotend #endif
#define HOTENDS 1
#if ENABLED(SWITCHING_EXTRUDER) || ENABLED(MIXING_EXTRUDER) // Unified E axis
#if ENABLED(MIXING_EXTRUDER)
#define E_STEPPERS MIXING_STEPPERS #define E_STEPPERS MIXING_STEPPERS
#else
#define E_STEPPERS 1 // One E stepper
#endif
#define E_MANUAL 1 #define E_MANUAL 1
#define TOOL_E_INDEX 0 #define TOOL_E_INDEX 0
#else // One stepper, E axis, and hotend per tool #else
#define HOTENDS EXTRUDERS
#define E_STEPPERS EXTRUDERS #define E_STEPPERS EXTRUDERS
#define E_MANUAL EXTRUDERS #define E_MANUAL EXTRUDERS
#define TOOL_E_INDEX current_block->active_extruder #define TOOL_E_INDEX current_block->active_extruder
#endif #endif
/** /**
* Distinct E Factors Disable by commenting out DISTINCT_E_FACTORS * DISTINCT_E_FACTORS affects how some E factors are accessed
*/ */
#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
#define XYZE_N (XYZ + E_STEPPERS) #define XYZE_N (XYZ + E_STEPPERS)
@ -357,6 +355,10 @@
#define BLTOUCH_RESET 160 #define BLTOUCH_RESET 160
#define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING) #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
// Always disable probe pin inverting for BLTouch
#undef Z_MIN_PROBE_ENDSTOP_INVERTING
#define Z_MIN_PROBE_ENDSTOP_INVERTING false
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#undef Z_MIN_ENDSTOP_INVERTING #undef Z_MIN_ENDSTOP_INVERTING
#define Z_MIN_ENDSTOP_INVERTING false #define Z_MIN_ENDSTOP_INVERTING false
@ -371,6 +373,13 @@
*/ */
#define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
/**
* UBL has its own manual probing, so this just causes trouble.
*/
#if ENABLED(AUTO_BED_LEVELING_UBL)
#undef PROBE_MANUALLY
#endif
/** /**
* Set a flag for any enabled probe * Set a flag for any enabled probe
*/ */

@ -326,7 +326,7 @@
#ifndef HOTEND_OFFSET_Y #ifndef HOTEND_OFFSET_Y
#define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
#endif #endif
#if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER)) #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE))
#define HOTEND_OFFSET_Z { 0 } #define HOTEND_OFFSET_Z { 0 }
#endif #endif
#endif #endif
@ -579,7 +579,7 @@
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT)) #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE))
// Digital control // Digital control
#define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS) #define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS)
@ -649,10 +649,10 @@
/** /**
* Heater & Fan Pausing * Heater & Fan Pausing
*/ */
#if ENABLED(PROBING_FANS_OFF) && FAN_COUNT == 0 #if FAN_COUNT == 0
#undef PROBING_FANS_OFF #undef PROBING_FANS_OFF
#endif #endif
#define QUIET_PROBING (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF)) #define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF)))
/** /**
* Servos and probes * Servos and probes
@ -730,11 +730,13 @@
/** /**
* Set granular options based on the specific type of leveling * Set granular options based on the specific type of leveling
*/ */
#define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)))
#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) #define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
#define HAS_ABL (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL)) #define HAS_ABL (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL))
#define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) #define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING))
#define PLANNER_LEVELING (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING)) #define PLANNER_LEVELING (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING) || UBL_DELTA)
#define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
#if HAS_PROBING_PROCEDURE #if HAS_PROBING_PROCEDURE
#define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION)) #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))
@ -779,12 +781,19 @@
#define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
#endif #endif
#if IS_KINEMATIC #if ENABLED(DELTA)
// Check for this in the code instead // These will be further constrained in code, but UBL_PROBE_PT values
#define MIN_PROBE_X X_MIN_POS // cannot be compile-time verified within the radius.
#define MAX_PROBE_X X_MAX_POS #define MIN_PROBE_X (-DELTA_PRINTABLE_RADIUS)
#define MIN_PROBE_Y Y_MIN_POS #define MAX_PROBE_X ( DELTA_PRINTABLE_RADIUS)
#define MAX_PROBE_Y Y_MAX_POS #define MIN_PROBE_Y (-DELTA_PRINTABLE_RADIUS)
#define MAX_PROBE_Y ( DELTA_PRINTABLE_RADIUS)
#elif IS_SCARA
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
#define MIN_PROBE_X (-SCARA_PRINTABLE_RADIUS)
#define MAX_PROBE_X ( SCARA_PRINTABLE_RADIUS)
#define MIN_PROBE_Y (-SCARA_PRINTABLE_RADIUS)
#define MAX_PROBE_Y ( SCARA_PRINTABLE_RADIUS)
#else #else
// Boundaries for probing based on set limits // Boundaries for probing based on set limits
#define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
@ -814,4 +823,28 @@
#define LCD_TIMEOUT_TO_STATUS 15000 #define LCD_TIMEOUT_TO_STATUS 15000
#endif #endif
/**
* DELTA_SEGMENT_MIN_LENGTH and DELTA_PROBEABLE_RADIUS for UBL_DELTA
*/
#if UBL_DELTA
#ifndef DELTA_SEGMENT_MIN_LENGTH
#if IS_SCARA
#define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
#elif ENABLED(DELTA)
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
#else // CARTESIAN
#define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
#endif
#endif
#ifndef DELTA_PROBEABLE_RADIUS
#define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
#endif
#endif
// Shorthand
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
// Add commands that need sub-codes to this list
#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET)
#endif // CONDITIONALS_POST_H #endif // CONDITIONALS_POST_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -876,7 +886,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -761,22 +766,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -787,14 +793,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1132,6 +1138,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1165,4 +1220,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -26,7 +26,7 @@
#include "MarlinConfig.h" #include "MarlinConfig.h"
#if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(UBL_G26_MESH_EDITING) #if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(UBL_G26_MESH_VALIDATION)
#include "ubl.h" #include "ubl.h"
#include "Marlin.h" #include "Marlin.h"
@ -34,6 +34,7 @@
#include "stepper.h" #include "stepper.h"
#include "temperature.h" #include "temperature.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "gcode.h"
#define EXTRUSION_MULTIPLIER 1.0 #define EXTRUSION_MULTIPLIER 1.0
#define RETRACTION_MULTIPLIER 1.0 #define RETRACTION_MULTIPLIER 1.0
@ -88,14 +89,8 @@
* *
* L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used. * L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used.
* *
* Q # Multiplier Retraction Multiplier. Normally not needed. Retraction defaults to 1.0mm and
* un-retraction is at 1.2mm These numbers will be scaled by the specified amount
*
* N # Nozzle Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
* 'n' can be used instead if your host program does not appreciate you using 'N'.
*
* O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This * O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
* is over kill, but using this parameter will let you get the very first 'cicle' perfect * is over kill, but using this parameter will let you get the very first 'circle' perfect
* so you have a trophy to peel off of the bed and hang up to show how perfectly you have your * so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
* Mesh calibrated. If not specified, a filament length of .3mm is assumed. * Mesh calibrated. If not specified, a filament length of .3mm is assumed.
* *
@ -106,19 +101,28 @@
* printing the Mesh. You can carefully remove the spent filament with a needle nose * printing the Mesh. You can carefully remove the spent filament with a needle nose
* pliers while holding the LCD Click wheel in a depressed state. * pliers while holding the LCD Click wheel in a depressed state.
* *
* R # Random Randomize the order that the circles are drawn on the bed. The search for the closest * Q # Multiplier Retraction Multiplier. Normally not needed. Retraction defaults to 1.0mm and
* un-retraction is at 1.2mm These numbers will be scaled by the specified amount
*
* R # Repeat Prints the number of patterns given as a parameter, starting at the current location.
* If a parameter isn't given, every point will be printed unless G26 is interrupted.
* This works the same way that the UBL G29 P4 R parameter works.
*
* S # Nozzle Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
*
* U # Random Randomize the order that the circles are drawn on the bed. The search for the closest
* undrawn cicle is still done. But the distance to the location for each circle has a * undrawn cicle is still done. But the distance to the location for each circle has a
* random number of the size specified added to it. Specifying R50 will give an interesting * random number of the size specified added to it. Specifying S50 will give an interesting
* deviation from the normal behaviour on a 10 x 10 Mesh. * deviation from the normal behaviour on a 10 x 10 Mesh.
* *
* X # X coordinate Specify the starting location of the drawing activity. * X # X Coord. Specify the starting location of the drawing activity.
* *
* Y # Y coordinate Specify the starting location of the drawing activity. * Y # Y Coord. Specify the starting location of the drawing activity.
*/ */
// External references // External references
extern float feedrate; extern float feedrate_mm_s; // must set before calling prepare_move_to_destination
extern Planner planner; extern Planner planner;
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
extern char lcd_status_message[]; extern char lcd_status_message[];
@ -126,55 +130,71 @@
extern float destination[XYZE]; extern float destination[XYZE];
void set_destination_to_current(); void set_destination_to_current();
void set_current_to_destination(); void set_current_to_destination();
float code_value_float(); void prepare_move_to_destination();
float code_value_linear_units(); void lcd_setstatusPGM(const char* const message, const int8_t level);
float code_value_axis_units(const AxisEnum axis);
bool code_value_bool();
bool code_has_value();
void lcd_init();
void lcd_setstatuspgm(const char* const message, const uint8_t level);
bool prepare_move_to_destination_cartesian();
void line_to_destination();
void line_to_destination(float);
void sync_plan_position_e(); void sync_plan_position_e();
void chirp_at_user(); void chirp_at_user();
// Private functions // Private functions
void un_retract_filament(float where[XYZE]); static uint16_t circle_flags[16], horizontal_mesh_line_flags[16], vertical_mesh_line_flags[16];
void retract_filament(float where[XYZE]);
void look_for_lines_to_connect();
bool parse_G26_parameters();
void move_to(const float&, const float&, const float&, const float&) ;
void print_line_from_here_to_there(const float&, const float&, const float&, const float&, const float&, const float&);
bool turn_on_heaters();
bool prime_nozzle();
static uint16_t circle_flags[16], horizontal_mesh_line_flags[16], vertical_mesh_line_flags[16], continue_with_closest = 0;
float g26_e_axis_feedrate = 0.020, float g26_e_axis_feedrate = 0.020,
random_deviation = 0.0, random_deviation = 0.0;
layer_height = LAYER_HEIGHT;
static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched
// retracts/recovers won't result in a bad state. // retracts/recovers won't result in a bad state.
float valid_trig_angle(float); float valid_trig_angle(float);
mesh_index_pair find_closest_circle_to_print(const float&, const float&);
static float extrusion_multiplier = EXTRUSION_MULTIPLIER, float unified_bed_leveling::g26_extrusion_multiplier,
retraction_multiplier = RETRACTION_MULTIPLIER, unified_bed_leveling::g26_retraction_multiplier,
nozzle = NOZZLE, unified_bed_leveling::g26_nozzle,
filament_diameter = FILAMENT, unified_bed_leveling::g26_filament_diameter,
prime_length = PRIME_LENGTH, unified_bed_leveling::g26_layer_height,
x_pos, y_pos, unified_bed_leveling::g26_prime_length,
ooze_amount = OOZE_AMOUNT; unified_bed_leveling::g26_x_pos,
unified_bed_leveling::g26_y_pos,
unified_bed_leveling::g26_ooze_amount;
int16_t unified_bed_leveling::g26_bed_temp,
unified_bed_leveling::g26_hotend_temp;
int8_t unified_bed_leveling::g26_prime_flag;
bool unified_bed_leveling::g26_continue_with_closest,
unified_bed_leveling::g26_keep_heaters_on;
int16_t unified_bed_leveling::g26_repeats;
void unified_bed_leveling::G26_line_to_destination(const float &feed_rate) {
const float save_feedrate = feedrate_mm_s;
feedrate_mm_s = feed_rate; // use specified feed rate
prepare_move_to_destination(); // will ultimately call ubl.line_to_destination_cartesian or ubl.prepare_linear_move_to for UBL_DELTA
feedrate_mm_s = save_feedrate; // restore global feed rate
}
/**
* Detect ubl_lcd_clicked, debounce it, and return true for cancel
*/
bool user_canceled() {
if (!ubl_lcd_clicked()) return false;
safe_delay(10); // Wait for click to settle
#if ENABLED(ULTRA_LCD)
lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
lcd_quick_feedback();
#endif
static int16_t bed_temp = BED_TEMP, while (!ubl_lcd_clicked()) idle(); // Wait for button release
hotend_temp = HOTEND_TEMP;
static int8_t prime_flag = 0; // If the button is suddenly pressed again,
// ask the user to resolve the issue
lcd_setstatusPGM(PSTR("Release button"), 99); // will never appear...
while (ubl_lcd_clicked()) idle(); // unless this loop happens
lcd_reset_status();
static bool keep_heaters_on = false; return true;
}
/** /**
* G26: Mesh Validation Pattern generation. * G26: Mesh Validation Pattern generation.
@ -182,7 +202,7 @@
* Used to interactively edit UBL's Mesh by placing the * Used to interactively edit UBL's Mesh by placing the
* nozzle in a problem area and doing a G29 P4 R command. * nozzle in a problem area and doing a G29 P4 R command.
*/ */
void gcode_G26() { void unified_bed_leveling::G26() {
SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s)."); SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s).");
float tmp, start_angle, end_angle; float tmp, start_angle, end_angle;
int i, xi, yi; int i, xi, yi;
@ -190,7 +210,7 @@
// Don't allow Mesh Validation without homing first, // Don't allow Mesh Validation without homing first,
// or if the parameter parsing did not go OK, abort // or if the parameter parsing did not go OK, abort
if (axis_unhomed_error(true, true, true) || parse_G26_parameters()) return; if (axis_unhomed_error() || parse_G26_parameters()) return;
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) { if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
@ -203,7 +223,7 @@
current_position[E_AXIS] = 0.0; current_position[E_AXIS] = 0.0;
sync_plan_position_e(); sync_plan_position_e();
if (prime_flag && prime_nozzle()) goto LEAVE; if (g26_prime_flag && prime_nozzle()) goto LEAVE;
/** /**
* Bed is preheated * Bed is preheated
@ -221,11 +241,11 @@
// Move nozzle to the specified height for the first layer // Move nozzle to the specified height for the first layer
set_destination_to_current(); set_destination_to_current();
destination[Z_AXIS] = layer_height; destination[Z_AXIS] = g26_layer_height;
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0.0); move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0.0);
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], ooze_amount); move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], g26_ooze_amount);
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
//debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern.")); //debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern."));
/** /**
@ -239,52 +259,22 @@
} }
do { do {
location = g26_continue_with_closest
if (ubl_lcd_clicked()) { // Check if the user wants to stop the Mesh Validation
#if ENABLED(ULTRA_LCD)
lcd_setstatuspgm(PSTR("Mesh Validation Stopped."), 99);
lcd_quick_feedback();
#endif
while (!ubl_lcd_clicked()) { // Wait until the user is done pressing the
idle(); // Encoder Wheel if that is why we are leaving
lcd_reset_alert_level();
lcd_setstatuspgm(PSTR(""));
}
while (ubl_lcd_clicked()) { // Wait until the user is done pressing the
idle(); // Encoder Wheel if that is why we are leaving
lcd_setstatuspgm(PSTR("Unpress Wheel"), 99);
}
goto LEAVE;
}
location = continue_with_closest
? find_closest_circle_to_print(current_position[X_AXIS], current_position[Y_AXIS]) ? find_closest_circle_to_print(current_position[X_AXIS], current_position[Y_AXIS])
: find_closest_circle_to_print(x_pos, y_pos); // Find the closest Mesh Intersection to where we are now. : find_closest_circle_to_print(g26_x_pos, g26_y_pos); // Find the closest Mesh Intersection to where we are now.
if (location.x_index >= 0 && location.y_index >= 0) { if (location.x_index >= 0 && location.y_index >= 0) {
const float circle_x = pgm_read_float(&ubl.mesh_index_to_xpos[location.x_index]), const float circle_x = mesh_index_to_xpos(location.x_index),
circle_y = pgm_read_float(&ubl.mesh_index_to_ypos[location.y_index]); circle_y = mesh_index_to_ypos(location.y_index);
// Let's do a couple of quick sanity checks. We can pull this code out later if we never see it catch a problem
#ifdef DELTA
if (HYPOT2(circle_x, circle_y) > sq(DELTA_PRINTABLE_RADIUS)) {
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Attempt to print outside of DELTA_PRINTABLE_RADIUS.");
goto LEAVE;
}
#endif
// TODO: Change this to use `position_is_reachable` // If this mesh location is outside the printable_radius, skip it.
if (!WITHIN(circle_x, X_MIN_POS, X_MAX_POS) || !WITHIN(circle_y, Y_MIN_POS, Y_MAX_POS)) {
SERIAL_ERROR_START; if (!position_is_reachable_raw_xy(circle_x, circle_y)) continue;
SERIAL_ERRORLNPGM("Attempt to print off the bed.");
goto LEAVE;
}
xi = location.x_index; // Just to shrink the next few lines and make them easier to understand xi = location.x_index; // Just to shrink the next few lines and make them easier to understand
yi = location.y_index; yi = location.y_index;
if (ubl.g26_debug_flag) { if (g26_debug_flag) {
SERIAL_ECHOPAIR(" Doing circle at: (xi=", xi); SERIAL_ECHOPAIR(" Doing circle at: (xi=", xi);
SERIAL_ECHOPAIR(", yi=", yi); SERIAL_ECHOPAIR(", yi=", yi);
SERIAL_CHAR(')'); SERIAL_CHAR(')');
@ -319,6 +309,9 @@
} }
for (tmp = start_angle; tmp < end_angle - 0.1; tmp += 30.0) { for (tmp = start_angle; tmp < end_angle - 0.1; tmp += 30.0) {
if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
int tmp_div_30 = tmp / 30.0; int tmp_div_30 = tmp / 30.0;
if (tmp_div_30 < 0) tmp_div_30 += 360 / 30; if (tmp_div_30 < 0) tmp_div_30 += 360 / 30;
if (tmp_div_30 > 11) tmp_div_30 -= 360 / 30; if (tmp_div_30 > 11) tmp_div_30 -= 360 / 30;
@ -327,9 +320,9 @@
y = circle_y + sin_table[tmp_div_30], y = circle_y + sin_table[tmp_div_30],
xe = circle_x + cos_table[tmp_div_30 + 1], xe = circle_x + cos_table[tmp_div_30 + 1],
ye = circle_y + sin_table[tmp_div_30 + 1]; ye = circle_y + sin_table[tmp_div_30 + 1];
#ifdef DELTA #if IS_KINEMATIC
if (HYPOT2(x, y) > sq(DELTA_PRINTABLE_RADIUS)) // Check to make sure this part of // Check to make sure this segment is entirely on the bed, skip if not.
continue; // the 'circle' is on the bed. If if (!position_is_reachable_raw_xy(x, y) || !position_is_reachable_raw_xy(xe, ye)) continue;
#else // not, we need to skip #else // not, we need to skip
x = constrain(x, X_MIN_POS + 1, X_MAX_POS - 1); // This keeps us from bumping the endstops x = constrain(x, X_MIN_POS + 1, X_MAX_POS - 1); // This keeps us from bumping the endstops
y = constrain(y, Y_MIN_POS + 1, Y_MAX_POS - 1); y = constrain(y, Y_MIN_POS + 1, Y_MAX_POS - 1);
@ -337,7 +330,7 @@
ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1); ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1);
#endif #endif
//if (ubl.g26_debug_flag) { //if (g26_debug_flag) {
// char ccc, *cptr, seg_msg[50], seg_num[10]; // char ccc, *cptr, seg_msg[50], seg_num[10];
// strcpy(seg_msg, " segment: "); // strcpy(seg_msg, " segment: ");
// strcpy(seg_num, " \n"); // strcpy(seg_num, " \n");
@ -348,22 +341,16 @@
// debug_current_and_destination(seg_msg); // debug_current_and_destination(seg_msg);
//} //}
print_line_from_here_to_there(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y), layer_height, LOGICAL_X_POSITION(xe), LOGICAL_Y_POSITION(ye), layer_height); print_line_from_here_to_there(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y), g26_layer_height, LOGICAL_X_POSITION(xe), LOGICAL_Y_POSITION(ye), g26_layer_height);
} }
if (look_for_lines_to_connect())
//debug_current_and_destination(PSTR("Looking for lines to connect.")); goto LEAVE;
look_for_lines_to_connect();
//debug_current_and_destination(PSTR("Done with line connect."));
} }
} while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0);
//debug_current_and_destination(PSTR("Done with current circle."));
} while (location.x_index >= 0 && location.y_index >= 0);
LEAVE: LEAVE:
lcd_reset_alert_level(); lcd_setstatusPGM(PSTR("Leaving G26"), -1);
lcd_setstatuspgm(PSTR("Leaving G26"));
retract_filament(destination); retract_filament(destination);
destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;
@ -372,16 +359,16 @@
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0); // Raise the nozzle move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0); // Raise the nozzle
//debug_current_and_destination(PSTR("done doing Z-Raise.")); //debug_current_and_destination(PSTR("done doing Z-Raise."));
destination[X_AXIS] = x_pos; // Move back to the starting position destination[X_AXIS] = g26_x_pos; // Move back to the starting position
destination[Y_AXIS] = y_pos; destination[Y_AXIS] = g26_y_pos;
//destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; // Keep the nozzle where it is //destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; // Keep the nozzle where it is
move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0); // Move back to the starting position move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], 0); // Move back to the starting position
//debug_current_and_destination(PSTR("done doing X/Y move.")); //debug_current_and_destination(PSTR("done doing X/Y move."));
ubl.has_control_of_lcd_panel = false; // Give back control of the LCD Panel! has_control_of_lcd_panel = false; // Give back control of the LCD Panel!
if (!keep_heaters_on) { if (!g26_keep_heaters_on) {
#if HAS_TEMP_BED #if HAS_TEMP_BED
thermalManager.setTargetBed(0); thermalManager.setTargetBed(0);
#endif #endif
@ -389,14 +376,13 @@
} }
} }
float valid_trig_angle(float d) { float valid_trig_angle(float d) {
while (d > 360.0) d -= 360.0; while (d > 360.0) d -= 360.0;
while (d < 0.0) d += 360.0; while (d < 0.0) d += 360.0;
return d; return d;
} }
mesh_index_pair find_closest_circle_to_print(const float &X, const float &Y) { mesh_index_pair unified_bed_leveling::find_closest_circle_to_print(const float &X, const float &Y) {
float closest = 99999.99; float closest = 99999.99;
mesh_index_pair return_val; mesh_index_pair return_val;
@ -405,8 +391,8 @@
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
if (!is_bit_set(circle_flags, i, j)) { if (!is_bit_set(circle_flags, i, j)) {
const float mx = pgm_read_float(&ubl.mesh_index_to_xpos[i]), // We found a circle that needs to be printed const float mx = mesh_index_to_xpos(i), // We found a circle that needs to be printed
my = pgm_read_float(&ubl.mesh_index_to_ypos[j]); my = mesh_index_to_ypos(j);
// Get the distance to this intersection // Get the distance to this intersection
float f = HYPOT(X - mx, Y - my); float f = HYPOT(X - mx, Y - my);
@ -415,7 +401,7 @@
// to let us find the closest circle to the start position. // to let us find the closest circle to the start position.
// But if this is not the case, add a small weighting to the // But if this is not the case, add a small weighting to the
// distance calculation to help it choose a better place to continue. // distance calculation to help it choose a better place to continue.
f += HYPOT(x_pos - mx, y_pos - my) / 15.0; f += HYPOT(g26_x_pos - mx, g26_y_pos - my) / 15.0;
// Add in the specified amount of Random Noise to our search // Add in the specified amount of Random Noise to our search
if (random_deviation > 1.0) if (random_deviation > 1.0)
@ -434,12 +420,14 @@
return return_val; return return_val;
} }
void look_for_lines_to_connect() { bool unified_bed_leveling::look_for_lines_to_connect() {
float sx, sy, ex, ey; float sx, sy, ex, ey;
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
if (user_canceled()) return true; // Check if the user wants to stop the Mesh Validation
if (i < GRID_MAX_POINTS_X) { // We can't connect to anything to the right than GRID_MAX_POINTS_X. if (i < GRID_MAX_POINTS_X) { // We can't connect to anything to the right than GRID_MAX_POINTS_X.
// This is already a half circle because we are at the edge of the bed. // This is already a half circle because we are at the edge of the bed.
@ -450,14 +438,16 @@
// We found two circles that need a horizontal line to connect them // We found two circles that need a horizontal line to connect them
// Print it! // Print it!
// //
sx = pgm_read_float(&ubl.mesh_index_to_xpos[ i ]) + (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // right edge sx = mesh_index_to_xpos( i ) + (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // right edge
ex = pgm_read_float(&ubl.mesh_index_to_xpos[i + 1]) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // left edge ex = mesh_index_to_xpos(i + 1) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // left edge
sx = constrain(sx, X_MIN_POS + 1, X_MAX_POS - 1); sx = constrain(sx, X_MIN_POS + 1, X_MAX_POS - 1);
sy = ey = constrain(pgm_read_float(&ubl.mesh_index_to_ypos[j]), Y_MIN_POS + 1, Y_MAX_POS - 1); sy = ey = constrain(mesh_index_to_ypos(j), Y_MIN_POS + 1, Y_MAX_POS - 1);
ex = constrain(ex, X_MIN_POS + 1, X_MAX_POS - 1); ex = constrain(ex, X_MIN_POS + 1, X_MAX_POS - 1);
if (ubl.g26_debug_flag) { if (position_is_reachable_raw_xy(sx, sy) && position_is_reachable_raw_xy(ex, ey)) {
if (g26_debug_flag) {
SERIAL_ECHOPAIR(" Connecting with horizontal line (sx=", sx); SERIAL_ECHOPAIR(" Connecting with horizontal line (sx=", sx);
SERIAL_ECHOPAIR(", sy=", sy); SERIAL_ECHOPAIR(", sy=", sy);
SERIAL_ECHOPAIR(") -> (ex=", ex); SERIAL_ECHOPAIR(") -> (ex=", ex);
@ -467,8 +457,9 @@
//debug_current_and_destination(PSTR("Connecting horizontal line.")); //debug_current_and_destination(PSTR("Connecting horizontal line."));
} }
print_line_from_here_to_there(LOGICAL_X_POSITION(sx), LOGICAL_Y_POSITION(sy), layer_height, LOGICAL_X_POSITION(ex), LOGICAL_Y_POSITION(ey), layer_height); print_line_from_here_to_there(LOGICAL_X_POSITION(sx), LOGICAL_Y_POSITION(sy), g26_layer_height, LOGICAL_X_POSITION(ex), LOGICAL_Y_POSITION(ey), g26_layer_height);
bit_set(horizontal_mesh_line_flags, i, j); // Mark it as done so we don't do it again }
bit_set(horizontal_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if we skipped it
} }
} }
@ -481,14 +472,16 @@
// We found two circles that need a vertical line to connect them // We found two circles that need a vertical line to connect them
// Print it! // Print it!
// //
sy = pgm_read_float(&ubl.mesh_index_to_ypos[ j ]) + (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // top edge sy = mesh_index_to_ypos( j ) + (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // top edge
ey = pgm_read_float(&ubl.mesh_index_to_ypos[j + 1]) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // bottom edge ey = mesh_index_to_ypos(j + 1) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // bottom edge
sx = ex = constrain(pgm_read_float(&ubl.mesh_index_to_xpos[i]), X_MIN_POS + 1, X_MAX_POS - 1); sx = ex = constrain(mesh_index_to_xpos(i), X_MIN_POS + 1, X_MAX_POS - 1);
sy = constrain(sy, Y_MIN_POS + 1, Y_MAX_POS - 1); sy = constrain(sy, Y_MIN_POS + 1, Y_MAX_POS - 1);
ey = constrain(ey, Y_MIN_POS + 1, Y_MAX_POS - 1); ey = constrain(ey, Y_MIN_POS + 1, Y_MAX_POS - 1);
if (ubl.g26_debug_flag) { if (position_is_reachable_raw_xy(sx, sy) && position_is_reachable_raw_xy(ex, ey)) {
if (g26_debug_flag) {
SERIAL_ECHOPAIR(" Connecting with vertical line (sx=", sx); SERIAL_ECHOPAIR(" Connecting with vertical line (sx=", sx);
SERIAL_ECHOPAIR(", sy=", sy); SERIAL_ECHOPAIR(", sy=", sy);
SERIAL_ECHOPAIR(") -> (ex=", ex); SERIAL_ECHOPAIR(") -> (ex=", ex);
@ -497,27 +490,25 @@
SERIAL_EOL; SERIAL_EOL;
debug_current_and_destination(PSTR("Connecting vertical line.")); debug_current_and_destination(PSTR("Connecting vertical line."));
} }
print_line_from_here_to_there(LOGICAL_X_POSITION(sx), LOGICAL_Y_POSITION(sy), layer_height, LOGICAL_X_POSITION(ex), LOGICAL_Y_POSITION(ey), layer_height); print_line_from_here_to_there(LOGICAL_X_POSITION(sx), LOGICAL_Y_POSITION(sy), g26_layer_height, LOGICAL_X_POSITION(ex), LOGICAL_Y_POSITION(ey), g26_layer_height);
bit_set(vertical_mesh_line_flags, i, j); // Mark it as done so we don't do it again
} }
bit_set(vertical_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if skipped
} }
} }
} }
} }
} }
} }
return false;
}
void move_to(const float &x, const float &y, const float &z, const float &e_delta) { void unified_bed_leveling::move_to(const float &x, const float &y, const float &z, const float &e_delta) {
float feed_value; float feed_value;
static float last_z = -999.99; static float last_z = -999.99;
bool has_xy_component = (x != current_position[X_AXIS] || y != current_position[Y_AXIS]); // Check if X or Y is involved in the movement. bool has_xy_component = (x != current_position[X_AXIS] || y != current_position[Y_AXIS]); // Check if X or Y is involved in the movement.
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() has_xy_component:", (int)has_xy_component);
if (z != last_z) { if (z != last_z) {
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() changing Z to ", (int)z);
last_z = z; last_z = z;
feed_value = planner.max_feedrate_mm_s[Z_AXIS]/(3.0); // Base the feed rate off of the configured Z_AXIS feed rate feed_value = planner.max_feedrate_mm_s[Z_AXIS]/(3.0); // Base the feed rate off of the configured Z_AXIS feed rate
@ -526,49 +517,40 @@
destination[Z_AXIS] = z; // We know the last_z==z or we wouldn't be in this block of code. destination[Z_AXIS] = z; // We know the last_z==z or we wouldn't be in this block of code.
destination[E_AXIS] = current_position[E_AXIS]; destination[E_AXIS] = current_position[E_AXIS];
ubl_line_to_destination(feed_value, 0); G26_line_to_destination(feed_value);
stepper.synchronize(); stepper.synchronize();
set_destination_to_current(); set_destination_to_current();
//if (ubl.g26_debug_flag) debug_current_and_destination(PSTR(" in move_to() done with Z move"));
} }
// Check if X or Y is involved in the movement. // Check if X or Y is involved in the movement.
// Yes: a 'normal' movement. No: a retract() or un_retract() // Yes: a 'normal' movement. No: a retract() or recover()
feed_value = has_xy_component ? PLANNER_XY_FEEDRATE() / 10.0 : planner.max_feedrate_mm_s[E_AXIS] / 1.5; feed_value = has_xy_component ? PLANNER_XY_FEEDRATE() / 10.0 : planner.max_feedrate_mm_s[E_AXIS] / 1.5;
if (ubl.g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() feed_value for XY:", feed_value); if (g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() feed_value for XY:", feed_value);
destination[X_AXIS] = x; destination[X_AXIS] = x;
destination[Y_AXIS] = y; destination[Y_AXIS] = y;
destination[E_AXIS] += e_delta; destination[E_AXIS] += e_delta;
//if (ubl.g26_debug_flag) debug_current_and_destination(PSTR(" in move_to() doing last move")); G26_line_to_destination(feed_value);
ubl_line_to_destination(feed_value, 0);
//if (ubl.g26_debug_flag) debug_current_and_destination(PSTR(" in move_to() after last move"));
stepper.synchronize(); stepper.synchronize();
set_destination_to_current(); set_destination_to_current();
} }
void retract_filament(float where[XYZE]) { void unified_bed_leveling::retract_filament(float where[XYZE]) {
if (!g26_retracted) { // Only retract if we are not already retracted! if (!g26_retracted) { // Only retract if we are not already retracted!
g26_retracted = true; g26_retracted = true;
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPGM(" Decided to do retract."); move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], -1.0 * g26_retraction_multiplier);
move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], -1.0 * retraction_multiplier);
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPGM(" Retraction done.");
} }
} }
void un_retract_filament(float where[XYZE]) { void unified_bed_leveling::recover_filament(float where[XYZE]) {
if (g26_retracted) { // Only un-retract if we are retracted. if (g26_retracted) { // Only un-retract if we are retracted.
move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], 1.2 * retraction_multiplier); move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], 1.2 * g26_retraction_multiplier);
g26_retracted = false; g26_retracted = false;
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPGM(" unretract done.");
} }
} }
@ -587,7 +569,7 @@
* segment of a 'circle'. The time this requires is very short and is easily saved by the other * segment of a 'circle'. The time this requires is very short and is easily saved by the other
* cases where the optimization comes into play. * cases where the optimization comes into play.
*/ */
void print_line_from_here_to_there(const float &sx, const float &sy, const float &sz, const float &ex, const float &ey, const float &ez) { void unified_bed_leveling::print_line_from_here_to_there(const float &sx, const float &sy, const float &sz, const float &ex, const float &ey, const float &ez) {
const float dx_s = current_position[X_AXIS] - sx, // find our distance from the start of the actual line segment const float dx_s = current_position[X_AXIS] - sx, // find our distance from the start of the actual line segment
dy_s = current_position[Y_AXIS] - sy, dy_s = current_position[Y_AXIS] - sy,
dist_start = HYPOT2(dx_s, dy_s), // We don't need to do a sqrt(), we can compare the distance^2 dist_start = HYPOT2(dx_s, dy_s), // We don't need to do a sqrt(), we can compare the distance^2
@ -601,26 +583,23 @@
// If the end point of the line is closer to the nozzle, flip the direction, // 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. // moving from the end to the start. On very small lines the optimization isn't worth it.
if (dist_end < dist_start && (SIZE_OF_INTERSECTION_CIRCLES) < abs(line_length)) { if (dist_end < dist_start && (SIZE_OF_INTERSECTION_CIRCLES) < abs(line_length)) {
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPGM(" Reversing start and end of print_line_from_here_to_there()");
return print_line_from_here_to_there(ex, ey, ez, sx, sy, sz); return print_line_from_here_to_there(ex, ey, ez, sx, sy, sz);
} }
// Decide whether to retract. // Decide whether to retract & bump
if (dist_start > 2.0) { if (dist_start > 2.0) {
retract_filament(destination); retract_filament(destination);
//if (ubl.g26_debug_flag) SERIAL_ECHOLNPGM(" filament retracted."); //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, sz + 0.500, 0.0); // Get to the starting point with no extrusion while bumped
} }
move_to(sx, sy, sz, 0.0); // Get to the starting point with no extrusion
const float e_pos_delta = line_length * g26_e_axis_feedrate * extrusion_multiplier; move_to(sx, sy, sz, 0.0); // Get to the starting point with no extrusion / un-Z bump
un_retract_filament(destination); const float e_pos_delta = line_length * g26_e_axis_feedrate * g26_extrusion_multiplier;
//if (ubl.g26_debug_flag) { recover_filament(destination);
// SERIAL_ECHOLNPGM(" doing printing move.");
// debug_current_and_destination(PSTR("doing final move_to() inside print_line_from_here_to_there()"));
//}
move_to(ex, ey, ez, e_pos_delta); // Get to the ending point with an appropriate amount of extrusion move_to(ex, ey, ez, e_pos_delta); // Get to the ending point with an appropriate amount of extrusion
} }
@ -629,42 +608,42 @@
* parameters it made sense to turn them into static globals and get * parameters it made sense to turn them into static globals and get
* this code out of sight of the main routine. * this code out of sight of the main routine.
*/ */
bool parse_G26_parameters() { bool unified_bed_leveling::parse_G26_parameters() {
extrusion_multiplier = EXTRUSION_MULTIPLIER; g26_extrusion_multiplier = EXTRUSION_MULTIPLIER;
retraction_multiplier = RETRACTION_MULTIPLIER; g26_retraction_multiplier = RETRACTION_MULTIPLIER;
nozzle = NOZZLE; g26_nozzle = NOZZLE;
filament_diameter = FILAMENT; g26_filament_diameter = FILAMENT;
layer_height = LAYER_HEIGHT; g26_layer_height = LAYER_HEIGHT;
prime_length = PRIME_LENGTH; g26_prime_length = PRIME_LENGTH;
bed_temp = BED_TEMP; g26_bed_temp = BED_TEMP;
hotend_temp = HOTEND_TEMP; g26_hotend_temp = HOTEND_TEMP;
ooze_amount = OOZE_AMOUNT; g26_prime_flag = 0;
prime_flag = 0;
keep_heaters_on = false; g26_ooze_amount = parser.seen('O') && parser.has_value() ? parser.value_linear_units() : OOZE_AMOUNT;
g26_keep_heaters_on = parser.seen('K') && parser.value_bool();
if (code_seen('B')) { g26_continue_with_closest = parser.seen('C') && parser.value_bool();
bed_temp = code_value_temp_abs();
if (!WITHIN(bed_temp, 15, 140)) { if (parser.seen('B')) {
g26_bed_temp = parser.value_celsius();
if (!WITHIN(g26_bed_temp, 15, 140)) {
SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible."); SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible.");
return UBL_ERR; return UBL_ERR;
} }
} }
if (code_seen('C')) continue_with_closest++; if (parser.seen('L')) {
g26_layer_height = parser.value_linear_units();
if (code_seen('L')) { if (!WITHIN(g26_layer_height, 0.0, 2.0)) {
layer_height = code_value_linear_units();
if (!WITHIN(layer_height, 0.0, 2.0)) {
SERIAL_PROTOCOLLNPGM("?Specified layer height not plausible."); SERIAL_PROTOCOLLNPGM("?Specified layer height not plausible.");
return UBL_ERR; return UBL_ERR;
} }
} }
if (code_seen('Q')) { if (parser.seen('Q')) {
if (code_has_value()) { if (parser.has_value()) {
retraction_multiplier = code_value_float(); g26_retraction_multiplier = parser.value_float();
if (!WITHIN(retraction_multiplier, 0.05, 15.0)) { if (!WITHIN(g26_retraction_multiplier, 0.05, 15.0)) {
SERIAL_PROTOCOLLNPGM("?Specified Retraction Multiplier not plausible."); SERIAL_PROTOCOLLNPGM("?Specified Retraction Multiplier not plausible.");
return UBL_ERR; return UBL_ERR;
} }
@ -675,93 +654,77 @@
} }
} }
if (code_seen('N') || code_seen('n')) { if (parser.seen('S')) {
nozzle = code_value_float(); g26_nozzle = parser.value_float();
if (!WITHIN(nozzle, 0.1, 1.0)) { if (!WITHIN(g26_nozzle, 0.1, 1.0)) {
SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible."); SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");
return UBL_ERR; return UBL_ERR;
} }
} }
if (code_seen('K')) keep_heaters_on++; if (parser.seen('P')) {
if (!parser.has_value())
if (code_seen('O') && code_has_value()) g26_prime_flag = -1;
ooze_amount = code_value_linear_units();
if (code_seen('P')) {
if (!code_has_value())
prime_flag = -1;
else { else {
prime_flag++; g26_prime_flag++;
prime_length = code_value_linear_units(); g26_prime_length = parser.value_linear_units();
if (!WITHIN(prime_length, 0.0, 25.0)) { if (!WITHIN(g26_prime_length, 0.0, 25.0)) {
SERIAL_PROTOCOLLNPGM("?Specified prime length not plausible."); SERIAL_PROTOCOLLNPGM("?Specified prime length not plausible.");
return UBL_ERR; return UBL_ERR;
} }
} }
} }
if (code_seen('F')) { if (parser.seen('F')) {
filament_diameter = code_value_linear_units(); g26_filament_diameter = parser.value_linear_units();
if (!WITHIN(filament_diameter, 1.0, 4.0)) { if (!WITHIN(g26_filament_diameter, 1.0, 4.0)) {
SERIAL_PROTOCOLLNPGM("?Specified filament size not plausible."); SERIAL_PROTOCOLLNPGM("?Specified filament size not plausible.");
return UBL_ERR; return UBL_ERR;
} }
} }
extrusion_multiplier *= sq(1.75) / sq(filament_diameter); // If we aren't using 1.75mm filament, we need to g26_extrusion_multiplier *= sq(1.75) / sq(g26_filament_diameter); // If we aren't using 1.75mm filament, we need to
// scale up or down the length needed to get the // scale up or down the length needed to get the
// same volume of filament // same volume of filament
extrusion_multiplier *= filament_diameter * sq(nozzle) / sq(0.3); // Scale up by nozzle size g26_extrusion_multiplier *= g26_filament_diameter * sq(g26_nozzle) / sq(0.3); // Scale up by nozzle size
if (code_seen('H')) { if (parser.seen('H')) {
hotend_temp = code_value_temp_abs(); g26_hotend_temp = parser.value_celsius();
if (!WITHIN(hotend_temp, 165, 280)) { if (!WITHIN(g26_hotend_temp, 165, 280)) {
SERIAL_PROTOCOLLNPGM("?Specified nozzle temperature not plausible."); SERIAL_PROTOCOLLNPGM("?Specified nozzle temperature not plausible.");
return UBL_ERR; return UBL_ERR;
} }
} }
if (code_seen('R')) { if (parser.seen('U')) {
randomSeed(millis()); randomSeed(millis());
random_deviation = code_has_value() ? code_value_float() : 50.0; // This setting will persist for the next G26
random_deviation = parser.has_value() ? parser.value_float() : 50.0;
} }
x_pos = current_position[X_AXIS]; g26_repeats = parser.seen('R') ? (parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1) : GRID_MAX_POINTS + 1;
y_pos = current_position[Y_AXIS]; if (g26_repeats < 1) {
SERIAL_PROTOCOLLNPGM("?(R)epeat value not plausible; must be at least 1.");
if (code_seen('X')) {
x_pos = code_value_axis_units(X_AXIS);
if (!WITHIN(x_pos, X_MIN_POS, X_MAX_POS)) {
SERIAL_PROTOCOLLNPGM("?Specified X coordinate not plausible.");
return UBL_ERR; return UBL_ERR;
} }
}
else
if (code_seen('Y')) { g26_x_pos = parser.seen('X') ? parser.value_linear_units() : current_position[X_AXIS];
y_pos = code_value_axis_units(Y_AXIS); g26_y_pos = parser.seen('Y') ? parser.value_linear_units() : current_position[Y_AXIS];
if (!WITHIN(y_pos, Y_MIN_POS, Y_MAX_POS)) { if (!position_is_reachable_xy(g26_x_pos, g26_y_pos)) {
SERIAL_PROTOCOLLNPGM("?Specified Y coordinate not plausible."); SERIAL_PROTOCOLLNPGM("?Specified X,Y coordinate out of bounds.");
return UBL_ERR; return UBL_ERR;
} }
}
/** /**
* We save the question of what to do with the Unified Bed Leveling System's Activation until the very * Wait until all parameters are verified before altering the state!
* end. The reason is, if one of the parameters specified up above is incorrect, we don't want to
* alter the system's status. We wait until we know everything is correct before altering the state
* of the system.
*/ */
ubl.state.active = !code_seen('D'); state.active = !parser.seen('D');
return UBL_OK; return UBL_OK;
} }
bool exit_from_g26() { bool unified_bed_leveling::exit_from_g26() {
//strcpy(lcd_status_message, "Leaving G26"); // We can't do lcd_setstatus() without having it continue; lcd_setstatusPGM(PSTR("Leaving G26"), -1);
lcd_reset_alert_level();
lcd_setstatuspgm(PSTR("Leaving G26"));
while (ubl_lcd_clicked()) idle(); while (ubl_lcd_clicked()) idle();
return UBL_ERR; return UBL_ERR;
} }
@ -770,18 +733,18 @@
* Turn on the bed and nozzle heat and * Turn on the bed and nozzle heat and
* wait for them to get up to temperature. * wait for them to get up to temperature.
*/ */
bool turn_on_heaters() { bool unified_bed_leveling::turn_on_heaters() {
millis_t next; millis_t next;
#if HAS_TEMP_BED #if HAS_TEMP_BED
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
if (bed_temp > 25) { if (g26_bed_temp > 25) {
lcd_setstatuspgm(PSTR("G26 Heating Bed."), 99); lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
lcd_quick_feedback(); lcd_quick_feedback();
#endif #endif
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
thermalManager.setTargetBed(bed_temp); thermalManager.setTargetBed(g26_bed_temp);
next = millis() + 5000UL; next = millis() + 5000UL;
while (abs(thermalManager.degBed() - bed_temp) > 3) { while (abs(thermalManager.degBed() - g26_bed_temp) > 3) {
if (ubl_lcd_clicked()) return exit_from_g26(); if (ubl_lcd_clicked()) return exit_from_g26();
if (PENDING(millis(), next)) { if (PENDING(millis(), next)) {
next = millis() + 5000UL; next = millis() + 5000UL;
@ -791,14 +754,14 @@
} }
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
} }
lcd_setstatuspgm(PSTR("G26 Heating Nozzle."), 99); lcd_setstatusPGM(PSTR("G26 Heating Nozzle."), 99);
lcd_quick_feedback(); lcd_quick_feedback();
#endif #endif
#endif #endif
// Start heating the nozzle and wait for it to reach temperature. // Start heating the nozzle and wait for it to reach temperature.
thermalManager.setTargetHotend(hotend_temp, 0); thermalManager.setTargetHotend(g26_hotend_temp, 0);
while (abs(thermalManager.degHotend(0) - hotend_temp) > 3) { while (abs(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
if (ubl_lcd_clicked()) return exit_from_g26(); if (ubl_lcd_clicked()) return exit_from_g26();
if (PENDING(millis(), next)) { if (PENDING(millis(), next)) {
next = millis() + 5000UL; next = millis() + 5000UL;
@ -808,8 +771,7 @@
} }
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
lcd_reset_alert_level(); lcd_reset_status();
lcd_setstatuspgm(PSTR(""));
lcd_quick_feedback(); lcd_quick_feedback();
#endif #endif
@ -819,19 +781,19 @@
/** /**
* Prime the nozzle if needed. Return true on error. * Prime the nozzle if needed. Return true on error.
*/ */
bool prime_nozzle() { bool unified_bed_leveling::prime_nozzle() {
float Total_Prime = 0.0; float Total_Prime = 0.0;
if (prime_flag == -1) { // The user wants to control how much filament gets purged if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
lcd_setstatuspgm(PSTR("User-Controlled Prime"), 99); lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
chirp_at_user(); chirp_at_user();
set_destination_to_current(); set_destination_to_current();
un_retract_filament(destination); // Make sure G26 doesn't think the filament is retracted(). recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
while (!ubl_lcd_clicked()) { while (!ubl_lcd_clicked()) {
chirp_at_user(); chirp_at_user();
@ -840,7 +802,7 @@
Total_Prime += 0.25; Total_Prime += 0.25;
if (Total_Prime >= EXTRUDE_MAXLENGTH) return UBL_ERR; if (Total_Prime >= EXTRUDE_MAXLENGTH) return UBL_ERR;
#endif #endif
ubl_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0, 0); G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
stepper.synchronize(); // Without this synchronize, the purge is more consistent, stepper.synchronize(); // Without this synchronize, the purge is more consistent,
// but because the planner has a buffer, we won't be able // but because the planner has a buffer, we won't be able
@ -853,23 +815,23 @@
while (ubl_lcd_clicked()) idle(); // Debounce Encoder Wheel while (ubl_lcd_clicked()) idle(); // Debounce Encoder Wheel
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
strcpy_P(lcd_status_message, PSTR("Done Priming")); // We can't do lcd_setstatuspgm() without having it continue; strcpy_P(lcd_status_message, PSTR("Done Priming")); // We can't do lcd_setstatusPGM() without having it continue;
// So... We cheat to get a message up. // So... We cheat to get a message up.
lcd_setstatuspgm(PSTR("Done Priming"), 99); lcd_setstatusPGM(PSTR("Done Priming"), 99);
lcd_quick_feedback(); lcd_quick_feedback();
#endif #endif
ubl.has_control_of_lcd_panel = false; has_control_of_lcd_panel = false;
} }
else { else {
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
lcd_setstatuspgm(PSTR("Fixed Length Prime."), 99); lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
lcd_quick_feedback(); lcd_quick_feedback();
#endif #endif
set_destination_to_current(); set_destination_to_current();
destination[E_AXIS] += prime_length; destination[E_AXIS] += g26_prime_length;
ubl_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0, 0); G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
stepper.synchronize(); stepper.synchronize();
set_destination_to_current(); set_destination_to_current();
retract_filament(destination); retract_filament(destination);
@ -878,4 +840,4 @@
return UBL_OK; return UBL_OK;
} }
#endif // AUTO_BED_LEVELING_UBL && UBL_G26_MESH_EDITING #endif // AUTO_BED_LEVELING_UBL && UBL_G26_MESH_VALIDATION

@ -61,6 +61,7 @@ extern size_t __heap_start, __heap_end, __flp;
extern char __bss_end; extern char __bss_end;
#include "Marlin.h" #include "Marlin.h"
#include "gcode.h"
#include "hex_print_routines.h" #include "hex_print_routines.h"
// //
@ -78,7 +79,7 @@ char* top_of_stack() {
} }
// Count the number of test bytes at the specified location. // Count the number of test bytes at the specified location.
int16_t count_test_bytes(const uint8_t * const ptr) { int16_t count_test_bytes(const char * const ptr) {
for (uint16_t i = 0; i < 32000; i++) for (uint16_t i = 0; i < 32000; i++)
if (((char) ptr[i]) != TEST_BYTE) if (((char) ptr[i]) != TEST_BYTE)
return i - 1; return i - 1;
@ -100,13 +101,13 @@ int16_t count_test_bytes(const uint8_t * const ptr) {
* the block. If so, it may indicate memory corruption due to a bad pointer. * the block. If so, it may indicate memory corruption due to a bad pointer.
* Unexpected bytes are flagged in the right column. * Unexpected bytes are flagged in the right column.
*/ */
void dump_free_memory(const uint8_t *ptr, const uint8_t *sp) { void dump_free_memory(const char *ptr, const char *sp) {
// //
// Start and end the dump on a nice 16 byte boundary // Start and end the dump on a nice 16 byte boundary
// (even though the values are not 16-byte aligned). // (even though the values are not 16-byte aligned).
// //
ptr = (uint8_t *)((uint16_t)ptr & 0xFFF0); // Align to 16-byte boundary ptr = (char *)((uint16_t)ptr & 0xFFF0); // Align to 16-byte boundary
sp = (uint8_t *)((uint16_t)sp | 0x000F); // Align sp to the 15th byte (at or above sp) sp = (char *)((uint16_t)sp | 0x000F); // Align sp to the 15th byte (at or above sp)
// Dump command main loop // Dump command main loop
while (ptr < sp) { while (ptr < sp) {
@ -121,7 +122,7 @@ int16_t count_test_bytes(const uint8_t * const ptr) {
SERIAL_CHAR('|'); // Point out non test bytes SERIAL_CHAR('|'); // Point out non test bytes
for (uint8_t i = 0; i < 16; i++) { for (uint8_t i = 0; i < 16; i++) {
char ccc = (char)ptr[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken char ccc = (char)ptr[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken
if (&ptr[i] >= command_queue && &ptr[i] < &command_queue[BUFSIZE][MAX_CMD_SIZE]) { // Print out ASCII in the command buffer area if (&ptr[i] >= (const char*)command_queue && &ptr[i] < (const char*)(command_queue + sizeof(command_queue))) { // Print out ASCII in the command buffer area
if (!WITHIN(ccc, ' ', 0x7E)) ccc = ' '; if (!WITHIN(ccc, ' ', 0x7E)) ccc = ' ';
} }
else { // If not in the command buffer area, flag bytes that don't match the test byte else { // If not in the command buffer area, flag bytes that don't match the test byte
@ -153,15 +154,14 @@ void M100_dump_routine(const char * const title, const char *start, const char *
* Return the number of free bytes in the memory pool, * Return the number of free bytes in the memory pool,
* with other vital statistics defining the pool. * with other vital statistics defining the pool.
*/ */
void free_memory_pool_report(const char * const ptr, const uint16_t size) { void free_memory_pool_report(char * const ptr, const int16_t size) {
int16_t max_cnt = -1; int16_t max_cnt = -1, block_cnt = 0;
uint16_t block_cnt = 0;
char *max_addr = NULL; char *max_addr = NULL;
// Find the longest block of test bytes in the buffer // Find the longest block of test bytes in the buffer
for (uint16_t i = 0; i < size; i++) { for (int16_t i = 0; i < size; i++) {
char * const addr = ptr + i; char *addr = ptr + i;
if (*addr == TEST_BYTE) { if (*addr == TEST_BYTE) {
const uint16_t j = count_test_bytes(addr); const int16_t j = count_test_bytes(addr);
if (j > 8) { if (j > 8) {
SERIAL_ECHOPAIR("Found ", j); SERIAL_ECHOPAIR("Found ", j);
SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr)); SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr));
@ -189,7 +189,7 @@ void free_memory_pool_report(const char * const ptr, const uint16_t size) {
* This is useful to check the correctness of the M100 D and the M100 F commands. * This is useful to check the correctness of the M100 D and the M100 F commands.
*/ */
void corrupt_free_memory(char *ptr, const uint16_t size) { void corrupt_free_memory(char *ptr, const uint16_t size) {
if (code_seen('C')) { if (parser.seen('C')) {
ptr += 8; ptr += 8;
const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack. const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
j = near_top / (size + 1); j = near_top / (size + 1);
@ -209,7 +209,7 @@ void free_memory_pool_report(const char * const ptr, const uint16_t size) {
* M100 I * M100 I
* Init memory for the M100 tests. (Automatically applied on the first M100.) * Init memory for the M100 tests. (Automatically applied on the first M100.)
*/ */
void init_free_memory(uint8_t *ptr, int16_t size) { void init_free_memory(char *ptr, int16_t size) {
SERIAL_ECHOLNPGM("Initializing free memory block.\n\n"); SERIAL_ECHOLNPGM("Initializing free memory block.\n\n");
size -= 250; // -250 to avoid interrupt activity that's altered the stack. size -= 250; // -250 to avoid interrupt activity that's altered the stack.
@ -225,8 +225,8 @@ void init_free_memory(uint8_t *ptr, int16_t size) {
SERIAL_ECHO(size); SERIAL_ECHO(size);
SERIAL_ECHOLNPGM(" bytes of memory initialized.\n"); SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
for (uint16_t i = 0; i < size; i++) { for (int16_t i = 0; i < size; i++) {
if ((char)ptr[i] != TEST_BYTE) { if (ptr[i] != TEST_BYTE) {
SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i)); SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i));
SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i])); SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i]));
SERIAL_EOL; SERIAL_EOL;
@ -248,23 +248,23 @@ void gcode_M100() {
// Always init on the first invocation of M100 // Always init on the first invocation of M100
static bool m100_not_initialized = true; static bool m100_not_initialized = true;
if (m100_not_initialized || code_seen('I')) { if (m100_not_initialized || parser.seen('I')) {
m100_not_initialized = false; m100_not_initialized = false;
init_free_memory(ptr, sp - ptr); init_free_memory(ptr, sp - ptr);
} }
#if ENABLED(M100_FREE_MEMORY_DUMPER) #if ENABLED(M100_FREE_MEMORY_DUMPER)
if (code_seen('D')) if (parser.seen('D'))
return dump_free_memory(ptr, sp); return dump_free_memory(ptr, sp);
#endif #endif
if (code_seen('F')) if (parser.seen('F'))
return free_memory_pool_report(ptr, sp - ptr); return free_memory_pool_report(ptr, sp - ptr);
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR) #if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if (code_seen('C')) if (parser.seen('C'))
return corrupt_free_memory(ptr, code_value_int()); return corrupt_free_memory(ptr, parser.value_int());
#endif #endif
} }
@ -292,7 +292,7 @@ int check_for_free_memory_corruption(const char * const title) {
// idle(); // idle();
safe_delay(20); safe_delay(20);
#ifdef M100_FREE_MEMORY_DUMPER #ifdef M100_FREE_MEMORY_DUMPER
M100_dump_routine(" Memory corruption detected with sp<Heap\n", (char*)0x1B80, 0x21FF); M100_dump_routine(" Memory corruption detected with sp<Heap\n", (char*)0x1B80, (char*)0x21FF);
#endif #endif
} }

@ -48,7 +48,7 @@
#endif #endif
void idle( void idle(
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout
#endif #endif
); );
@ -217,8 +217,8 @@ extern bool volumetric_enabled;
extern int flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder extern int flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder. extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
extern bool axis_known_position[XYZ]; // axis[n].is_known extern bool axis_known_position[XYZ];
extern bool axis_homed[XYZ]; // axis[n].is_homed extern bool axis_homed[XYZ];
extern volatile bool wait_for_heatup; extern volatile bool wait_for_heatup;
#if HAS_RESUME_CONTINUE #if HAS_RESUME_CONTINUE
@ -287,22 +287,6 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
void update_software_endstops(const AxisEnum axis); void update_software_endstops(const AxisEnum axis);
#endif #endif
// GCode support for external objects
bool code_seen(char);
int code_value_int();
int16_t code_value_temp_abs();
int16_t code_value_temp_diff();
#if ENABLED(INCH_MODE_SUPPORT)
float code_value_linear_units();
float code_value_axis_units(const AxisEnum axis);
float code_value_per_axis_unit(const AxisEnum axis);
#else
#define code_value_linear_units() code_value_float()
#define code_value_axis_units(A) code_value_float()
#define code_value_per_axis_unit(A) code_value_float()
#endif
#if IS_KINEMATIC #if IS_KINEMATIC
extern float delta[ABC]; extern float delta[ABC];
void inverse_kinematics(const float logical[XYZ]); void inverse_kinematics(const float logical[XYZ]);
@ -326,7 +310,6 @@ int16_t code_value_temp_diff();
extern float bilinear_grid_factor[2], extern float bilinear_grid_factor[2],
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
float bilinear_z_offset(const float logical[XYZ]); float bilinear_z_offset(const float logical[XYZ]);
void set_bed_leveling_enabled(bool enable=true);
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
@ -335,6 +318,9 @@ int16_t code_value_temp_diff();
#endif #endif
#if HAS_LEVELING #if HAS_LEVELING
bool leveling_is_valid();
bool leveling_is_active();
void set_bed_leveling_enabled(const bool enable=true);
void reset_bed_level(); void reset_bed_level();
#endif #endif
@ -351,6 +337,9 @@ int16_t code_value_temp_diff();
void refresh_zprobe_zoffset(const bool no_babystep=false); void refresh_zprobe_zoffset(const bool no_babystep=false);
#define DEPLOY_PROBE() set_probe_deployed(true) #define DEPLOY_PROBE() set_probe_deployed(true)
#define STOW_PROBE() set_probe_deployed(false) #define STOW_PROBE() set_probe_deployed(false)
#else
#define DEPLOY_PROBE()
#define STOW_PROBE()
#endif #endif
#if ENABLED(HOST_KEEPALIVE_FEATURE) #if ENABLED(HOST_KEEPALIVE_FEATURE)
@ -382,8 +371,8 @@ int16_t code_value_temp_diff();
extern int meas_delay_cm; // Delay distance extern int meas_delay_cm; // Delay distance
#endif #endif
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
extern FilamentChangeMenuResponse filament_change_menu_response; extern AdvancedPauseMenuResponse advanced_pause_menu_response;
#endif #endif
#if ENABLED(PID_EXTRUSION_SCALING) #if ENABLED(PID_EXTRUSION_SCALING)
@ -426,7 +415,65 @@ void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0); void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) #if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
bool axis_unhomed_error(const bool x, const bool y, const bool z); bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
#endif
/**
* position_is_reachable family of functions
*/
#if IS_KINEMATIC // (DELTA or SCARA)
#if IS_SCARA
extern const float L1, L2;
#endif
inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
#if ENABLED(DELTA)
return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
#elif IS_SCARA
#if MIDDLE_DEAD_ZONE_R > 0
const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
return R2 >= sq(float(MIDDLE_DEAD_ZONE_R)) && R2 <= sq(L1 + L2);
#else
return HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y) <= sq(L1 + L2);
#endif
#else // CARTESIAN
// To be migrated from MakerArm branch in future
#endif #endif
}
inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
// Both the nozzle and the probe must be able to reach the point.
// This won't work on SCARA since the probe offset rotates with the arm.
return position_is_reachable_raw_xy(rx, ry)
&& position_is_reachable_raw_xy(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
}
#else // CARTESIAN
inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
// Add 0.001 margin to deal with float imprecision
return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
&& WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
}
inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
// Add 0.001 margin to deal with float imprecision
return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
&& WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
}
#endif // CARTESIAN
FORCE_INLINE bool position_is_reachable_by_probe_xy(const float &lx, const float &ly) {
return position_is_reachable_by_probe_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
}
FORCE_INLINE bool position_is_reachable_xy(const float &lx, const float &ly) {
return position_is_reachable_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
}
#endif // MARLIN_H #endif // MARLIN_H

File diff suppressed because it is too large Load Diff

@ -99,7 +99,31 @@
#elif defined(SERVO_DEACTIVATION_DELAY) #elif defined(SERVO_DEACTIVATION_DELAY)
#error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead." #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
#elif ENABLED(FILAMENTCHANGEENABLE) #elif ENABLED(FILAMENTCHANGEENABLE)
#error "FILAMENTCHANGEENABLE is now FILAMENT_CHANGE_FEATURE. Please update your configuration." #error "FILAMENTCHANGEENABLE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_FEATURE)
#error "FILAMENT_CHANGE_FEATURE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_X_POS)
#error "FILAMENT_CHANGE_X_POS is now PAUSE_PARK_X_POS. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_Y_POS)
#error "FILAMENT_CHANGE_Y_POS is now PAUSE_PARK_Y_POS. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_Z_ADD)
#error "FILAMENT_CHANGE_Z_ADD is now PAUSE_PARK_Z_ADD. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_XY_FEEDRATE)
#error "FILAMENT_CHANGE_XY_FEEDRATE is now PAUSE_PARK_XY_FEEDRATE. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_Z_FEEDRATE)
#error "FILAMENT_CHANGE_Z_FEEDRATE is now PAUSE_PARK_Z_FEEDRATE. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_RETRACT_FEEDRATE)
#error "FILAMENT_CHANGE_RETRACT_FEEDRATE is now PAUSE_PARK_RETRACT_FEEDRATE. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_RETRACT_LENGTH)
#error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
#error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_EXTRUDE_LENGTH)
#error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_EXTRUDE_LENGTH. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
#error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
#elif ENABLED(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT)
#error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT. Please update your configuration."
#elif defined(PLA_PREHEAT_HOTEND_TEMP) #elif defined(PLA_PREHEAT_HOTEND_TEMP)
#error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration." #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration."
#elif defined(PLA_PREHEAT_HPB_TEMP) #elif defined(PLA_PREHEAT_HPB_TEMP)
@ -157,7 +181,11 @@
#elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS) #elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
#error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration." #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
#elif defined(UBL_MESH_EDIT_ENABLED) #elif defined(UBL_MESH_EDIT_ENABLED)
#error "UBL_MESH_EDIT_ENABLED is now UBL_G26_MESH_EDITING. Please update your configuration." #error "UBL_MESH_EDIT_ENABLED is now UBL_G26_MESH_VALIDATION. Please update your configuration."
#elif defined(UBL_MESH_EDITING)
#error "UBL_MESH_EDITING is now UBL_G26_MESH_VALIDATION. Please update your configuration."
#elif defined(BLTOUCH_HEATERS_OFF)
#error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration."
#elif defined(BEEPER) #elif defined(BEEPER)
#error "BEEPER is now BEEPER_PIN. Please update your pins definitions." #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
#elif defined(SDCARDDETECT) #elif defined(SDCARDDETECT)
@ -248,10 +276,9 @@
#if ENABLED(DELTA) #if ENABLED(DELTA)
#if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG) #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
#error "You probably want to use Max Endstops for DELTA!" #error "You probably want to use Max Endstops for DELTA!"
#elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA
#error "DELTA is incompatible with ENABLE_LEVELING_FADE_HEIGHT. Please disable it." #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
#endif #elif ABL_GRID
#if ABL_GRID
#if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0 #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
#error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers." #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
#elif GRID_MAX_POINTS_X < 3 #elif GRID_MAX_POINTS_X < 3
@ -283,19 +310,19 @@
#error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN." #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
#elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART) #elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART)
#error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART." #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
#elif DISABLED(FILAMENT_CHANGE_FEATURE) #elif DISABLED(ADVANCED_PAUSE_FEATURE)
static_assert(NULL == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "FILAMENT_CHANGE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR."); static_assert(NULL == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
#endif #endif
#endif #endif
/** /**
* Filament Change with Extruder Runout Prevention * Advanced Pause
*/ */
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#if DISABLED(ULTIPANEL) #if DISABLED(ULTIPANEL)
#error "FILAMENT_CHANGE_FEATURE currently requires an LCD controller." #error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller."
#elif ENABLED(EXTRUDER_RUNOUT_PREVENT) #elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
#error "EXTRUDER_RUNOUT_PREVENT is incompatible with FILAMENT_CHANGE_FEATURE." #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
#elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(ULTIPANEL) && DISABLED(EMERGENCY_PARSER) #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(ULTIPANEL) && DISABLED(EMERGENCY_PARSER)
#error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller." #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
#endif #endif
@ -330,11 +357,16 @@
#endif #endif
/** /**
* Only one type of extruder allowed * A dual nozzle x-carriage with switching servo
*/ */
#if (ENABLED(SWITCHING_EXTRUDER) && (ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER))) \ #if ENABLED(SWITCHING_NOZZLE)
|| (ENABLED(SINGLENOZZLE) && ENABLED(MIXING_EXTRUDER)) #if ENABLED(SINGLENOZZLE)
#error "Please define only one type of extruder: SINGLENOZZLE, SWITCHING_EXTRUDER, or MIXING_EXTRUDER." #error "SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
#elif EXTRUDERS < 2
#error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
#elif NUM_SERVOS < 1
#error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
#endif
#endif #endif
/** /**
@ -356,12 +388,16 @@
#if ENABLED(MIXING_EXTRUDER) #if ENABLED(MIXING_EXTRUDER)
#if EXTRUDERS > 1 #if EXTRUDERS > 1
#error "MIXING_EXTRUDER currently only supports one extruder." #error "MIXING_EXTRUDER currently only supports one extruder."
#endif #elif MIXING_STEPPERS < 2
#if MIXING_STEPPERS < 2
#error "You must set MIXING_STEPPERS >= 2 for a mixing extruder." #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
#endif #elif ENABLED(FILAMENT_SENSOR)
#if ENABLED(FILAMENT_SENSOR)
#error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway." #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway."
#elif ENABLED(SWITCHING_EXTRUDER)
#error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both."
#elif ENABLED(SINGLENOZZLE)
#error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE."
#elif ENABLED(LIN_ADVANCE)
#error "MIXING_EXTRUDER is incompatible with LIN_ADVANCE."
#endif #endif
#endif #endif
@ -373,10 +409,10 @@
#endif #endif
/** /**
* Servo deactivation depends on servo endstops * Servo deactivation depends on servo endstops or switching nozzle
*/ */
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP && !defined(SWITCHING_NOZZLE_SERVO_NR)
#error "Z_ENDSTOP_SERVO_NR is required for DEACTIVATE_SERVOS_AFTER_MOVE." #error "Z_ENDSTOP_SERVO_NR or switching nozzle is required for DEACTIVATE_SERVOS_AFTER_MOVE."
#endif #endif
/** /**
@ -430,8 +466,8 @@ static_assert(1 >= 0
* Unified Bed Leveling * Unified Bed Leveling
*/ */
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
#if ENABLED(DELTA) #if IS_SCARA
#error "AUTO_BED_LEVELING_UBL does not yet support DELTA printers." #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
#elif DISABLED(NEWPANEL) #elif DISABLED(NEWPANEL)
#error "AUTO_BED_LEVELING_UBL requires an LCD controller." #error "AUTO_BED_LEVELING_UBL requires an LCD controller."
#endif #endif
@ -457,16 +493,16 @@ static_assert(1 >= 0
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
+ 1 + 1
#endif #endif
#if ENABLED(Z_PROBE_ALLEN_KEY) #if ENABLED(SOLENOID_PROBE)
+ 1 + 1
#endif #endif
#if ENABLED(Z_PROBE_SLED) #if ENABLED(Z_PROBE_ALLEN_KEY)
+ 1 + 1
#endif #endif
#if ENABLED(SOLENOID_PROBE) #if ENABLED(Z_PROBE_SLED)
+ 1 + 1
#endif #endif
, "Please enable only one probe: PROBE_MANUALLY, FIX_MOUNTED_PROBE, Z Servo, BLTOUCH, Z_PROBE_ALLEN_KEY, or Z_PROBE_SLED." , "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
); );
@ -535,15 +571,26 @@ static_assert(1 >= 0
#error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0." #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
#endif #endif
/**
* Advanced Pause is required in order to turn the heaters off during probing
*/
#if (ENABLED(PROBING_HEATERS_OFF) && DISABLED(ADVANCED_PAUSE_FEATURE))
#error "PROBING_HEATERS_OFF requires ADVANCED_PAUSE_FEATURE"
#endif
#else #else
/** /**
* Require some kind of probe for bed leveling and probe testing * Require some kind of probe for bed leveling and probe testing
*/ */
#if HAS_ABL #if HAS_ABL
#error "Auto Bed Leveling requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." #if ENABLED(AUTO_BED_LEVELING_UBL)
#error "Unified Bed Leveling requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
#else
#error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
#endif
#elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) #elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
#error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
#endif #endif
#endif #endif
@ -593,12 +640,8 @@ static_assert(1 >= 0
/** /**
* Delta and SCARA have limited bed leveling options * Delta and SCARA have limited bed leveling options
*/ */
#if DISABLED(AUTO_BED_LEVELING_BILINEAR) #if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR)
#if ENABLED(DELTA) #error "Only AUTO_BED_LEVELING_BILINEAR currently supports SCARA bed leveling."
#error "Only AUTO_BED_LEVELING_BILINEAR is supported for DELTA bed leveling."
#elif ENABLED(SCARA)
#error "Only AUTO_BED_LEVELING_BILINEAR is supported for SCARA bed leveling."
#endif
#endif #endif
/** /**
@ -626,6 +669,10 @@ static_assert(1 >= 0
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration." #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
#elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15) #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
#error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15." #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
#endif
#if IS_CARTESIAN
#if !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
#error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
#elif !WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X) #elif !WITHIN(UBL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X)
#error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe." #error "The given UBL_PROBE_PT_1_X can't be reached by the Z probe."
#elif !WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X) #elif !WITHIN(UBL_PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X)
@ -639,6 +686,7 @@ static_assert(1 >= 0
#elif !WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y) #elif !WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y)
#error "The given UBL_PROBE_PT_3_Y can't be reached by the Z probe." #error "The given UBL_PROBE_PT_3_Y can't be reached by the Z probe."
#endif #endif
#endif
#else // AUTO_BED_LEVELING_3POINT #else // AUTO_BED_LEVELING_3POINT
#if !WITHIN(ABL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X) #if !WITHIN(ABL_PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X)
#error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe." #error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe."
@ -1127,3 +1175,64 @@ static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires 4
static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements."); static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements.");
static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements."); static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements.");
static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements."); static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements.");
/**
* Sanity checks for Spindle / Laser
*/
#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 !(WITHIN(SPINDLE_LASER_PWM_PIN, 2, 13) || WITHIN(SPINDLE_LASER_PWM_PIN, 44, 46))
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
#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 SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
#elif PIN_EXISTS(X_MAX) && X_MAX_PIN == SPINDLE_LASER_PWM_PIN
#error "SPINDLE_LASER_PWM pin is in use by X_MAX endstop."
#elif PIN_EXISTS(X_MIN) && X_MIN_PIN == SPINDLE_LASER_PWM_PIN
#error "SPINDLE_LASER_PWM pin is in use by X_MIN endstop."
#elif PIN_EXISTS(Z_STEP) && Z_STEP_PIN == SPINDLE_LASER_PWM_PIN
#error "SPINDLE_LASER_PWM pin in use by Z_STEP."
#elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
#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."
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_XY) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_XY_PIN
#error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_XY."
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_Z_PIN
#error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_Z."
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_E) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_E_PIN
#error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_E."
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT."
#endif
#endif
#endif // SPINDLE_LASER_ENABLE

@ -36,16 +36,16 @@
* *
*/ */
#define EEPROM_VERSION "V37" #define EEPROM_VERSION "V38"
// Change EEPROM version if these are changed: // Change EEPROM version if these are changed:
#define EEPROM_OFFSET 100 #define EEPROM_OFFSET 100
/** /**
* V37 EEPROM Layout: * V38 EEPROM Layout:
* *
* 100 Version (char x4) * 100 Version (char x4)
* 104 EEPROM Checksum (uint16_t) * 104 EEPROM CRC16 (uint16_t)
* *
* 106 E_STEPPERS (uint8_t) * 106 E_STEPPERS (uint8_t)
* 107 M92 XYZE planner.axis_steps_per_mm (float x4 ... x8) * 107 M92 XYZE planner.axis_steps_per_mm (float x4 ... x8)
@ -90,7 +90,7 @@
* AUTO_BED_LEVELING_UBL: 6 bytes * AUTO_BED_LEVELING_UBL: 6 bytes
* 324 G29 A ubl.state.active (bool) * 324 G29 A ubl.state.active (bool)
* 325 G29 Z ubl.state.z_offset (float) * 325 G29 Z ubl.state.z_offset (float)
* 329 G29 S ubl.state.eeprom_storage_slot (int8_t) * 329 G29 S ubl.state.storage_slot (int8_t)
* *
* DELTA: 48 bytes * DELTA: 48 bytes
* 348 M666 XYZ endstop_adj (float x3) * 348 M666 XYZ endstop_adj (float x3)
@ -123,7 +123,7 @@
* 490 M304 PID thermalManager.bedKp, .bedKi, .bedKd (float x3) * 490 M304 PID thermalManager.bedKp, .bedKi, .bedKd (float x3)
* *
* DOGLCD: 2 bytes * DOGLCD: 2 bytes
* 502 M250 C lcd_contrast (int) * 502 M250 C lcd_contrast (uint16_t)
* *
* FWRETRACT: 29 bytes * FWRETRACT: 29 bytes
* 504 M209 S autoretract_enabled (bool) * 504 M209 S autoretract_enabled (bool)
@ -158,6 +158,14 @@
* *
* 588 Minimum end-point * 588 Minimum end-point
* 1909 (588 + 36 + 9 + 288 + 988) Maximum end-point * 1909 (588 + 36 + 9 + 288 + 988) Maximum end-point
*
* ========================================================================
* meshes_begin (between max and min end-point, directly above)
* -- MESHES --
* meshes_end
* -- MAT (Mesh Allocation Table) -- 128 bytes (placeholder size)
* mat_end = E2END (0xFFF)
*
*/ */
#include "configuration_store.h" #include "configuration_store.h"
@ -170,6 +178,10 @@ MarlinSettings settings;
#include "temperature.h" #include "temperature.h"
#include "ultralcd.h" #include "ultralcd.h"
#if ENABLED(INCH_MODE_SUPPORT) || (ENABLED(ULTIPANEL) && ENABLED(TEMPERATURE_UNITS_SUPPORT))
#include "gcode.h"
#endif
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#endif #endif
@ -230,18 +242,26 @@ void MarlinSettings::postprocess() {
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
#define DUMMY_PID_VALUE 3000.0f
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET
#define EEPROM_SKIP(VAR) eeprom_index += sizeof(VAR)
#define EEPROM_WRITE(VAR) write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
#define EEPROM_READ(VAR) read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
#define EEPROM_ASSERT(TST,ERR) if (!(TST)) do{ SERIAL_ERROR_START; SERIAL_ERRORLNPGM(ERR); eeprom_read_error = true; }while(0)
const char version[4] = EEPROM_VERSION; const char version[4] = EEPROM_VERSION;
uint16_t MarlinSettings::eeprom_checksum; bool MarlinSettings::eeprom_error;
bool MarlinSettings::eeprom_write_error, #if ENABLED(AUTO_BED_LEVELING_UBL)
MarlinSettings::eeprom_read_error; int MarlinSettings::meshes_begin;
#endif
void MarlinSettings::write_data(int &pos, const uint8_t* value, uint16_t size) { void MarlinSettings::write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
if (eeprom_write_error) return; if (eeprom_error) return;
while (size--) { while (size--) {
uint8_t * const p = (uint8_t * const)pos; uint8_t * const p = (uint8_t * const)pos;
const uint8_t v = *value; uint8_t v = *value;
// EEPROM has only ~100,000 write cycles, // EEPROM has only ~100,000 write cycles,
// so only write bytes that have changed! // so only write bytes that have changed!
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
@ -249,32 +269,27 @@ void MarlinSettings::postprocess() {
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE); SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
eeprom_write_error = true; eeprom_error = true;
return; return;
} }
} }
eeprom_checksum += v; crc16(crc, &v, 1);
pos++; pos++;
value++; value++;
}; };
} }
void MarlinSettings::read_data(int &pos, uint8_t* value, uint16_t size) {
void MarlinSettings::read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
if (eeprom_error) return;
do { do {
uint8_t c = eeprom_read_byte((unsigned char*)pos); uint8_t c = eeprom_read_byte((unsigned char*)pos);
if (!eeprom_read_error) *value = c; *value = c;
eeprom_checksum += c; crc16(crc, &c, 1);
pos++; pos++;
value++; value++;
} while (--size); } while (--size);
} }
#define DUMMY_PID_VALUE 3000.0f
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET
#define EEPROM_SKIP(VAR) eeprom_index += sizeof(VAR)
#define EEPROM_WRITE(VAR) write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR))
#define EEPROM_READ(VAR) read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR))
#define EEPROM_ASSERT(TST,ERR) if (!(TST)) do{ SERIAL_ERROR_START; SERIAL_ERRORLNPGM(ERR); eeprom_read_error = true; }while(0)
/** /**
* M500 - Store Configuration * M500 - Store Configuration
*/ */
@ -282,14 +297,16 @@ void MarlinSettings::postprocess() {
float dummy = 0.0f; float dummy = 0.0f;
char ver[4] = "000"; char ver[4] = "000";
uint16_t working_crc = 0;
EEPROM_START(); EEPROM_START();
eeprom_write_error = false; eeprom_error = false;
EEPROM_WRITE(ver); // invalidate data first EEPROM_WRITE(ver); // invalidate data first
EEPROM_SKIP(eeprom_checksum); // Skip the checksum slot EEPROM_SKIP(working_crc); // Skip the checksum slot
eeprom_checksum = 0; // clear before first "real data" working_crc = 0; // clear before first "real data"
const uint8_t esteppers = COUNT(planner.axis_steps_per_mm) - XYZ; const uint8_t esteppers = COUNT(planner.axis_steps_per_mm) - XYZ;
EEPROM_WRITE(esteppers); EEPROM_WRITE(esteppers);
@ -342,7 +359,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
// Compile time test that sizeof(mbl.z_values) is as expected // Compile time test that sizeof(mbl.z_values) is as expected
static_assert( static_assert(
sizeof(mbl.z_values) == (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y) * sizeof(mbl.z_values[0][0]), sizeof(mbl.z_values) == GRID_MAX_POINTS * sizeof(mbl.z_values[0][0]),
"MBL Z array is the wrong size." "MBL Z array is the wrong size."
); );
const bool leveling_is_on = TEST(mbl.status, MBL_STATUS_HAS_MESH_BIT); const bool leveling_is_on = TEST(mbl.status, MBL_STATUS_HAS_MESH_BIT);
@ -386,7 +403,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Compile time test that sizeof(z_values) is as expected // Compile time test that sizeof(z_values) is as expected
static_assert( static_assert(
sizeof(z_values) == (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y) * sizeof(z_values[0][0]), sizeof(z_values) == GRID_MAX_POINTS * sizeof(z_values[0][0]),
"Bilinear Z array is the wrong size." "Bilinear Z array is the wrong size."
); );
const uint8_t grid_max_x = GRID_MAX_POINTS_X, grid_max_y = GRID_MAX_POINTS_Y; const uint8_t grid_max_x = GRID_MAX_POINTS_X, grid_max_y = GRID_MAX_POINTS_Y;
@ -410,14 +427,14 @@ void MarlinSettings::postprocess() {
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
EEPROM_WRITE(ubl.state.active); EEPROM_WRITE(ubl.state.active);
EEPROM_WRITE(ubl.state.z_offset); EEPROM_WRITE(ubl.state.z_offset);
EEPROM_WRITE(ubl.state.eeprom_storage_slot); EEPROM_WRITE(ubl.state.storage_slot);
#else #else
const bool ubl_active = 0; const bool ubl_active = false;
dummy = 0.0f; dummy = 0.0f;
const int8_t eeprom_slot = -1; const int8_t storage_slot = -1;
EEPROM_WRITE(ubl_active); EEPROM_WRITE(ubl_active);
EEPROM_WRITE(dummy); EEPROM_WRITE(dummy);
EEPROM_WRITE(eeprom_slot); EEPROM_WRITE(storage_slot);
#endif // AUTO_BED_LEVELING_UBL #endif // AUTO_BED_LEVELING_UBL
// 9 floats for DELTA / Z_DUAL_ENDSTOPS // 9 floats for DELTA / Z_DUAL_ENDSTOPS
@ -489,7 +506,7 @@ void MarlinSettings::postprocess() {
#endif #endif
#if !HAS_LCD_CONTRAST #if !HAS_LCD_CONTRAST
const int lcd_contrast = 32; const uint16_t lcd_contrast = 32;
#endif #endif
EEPROM_WRITE(lcd_contrast); EEPROM_WRITE(lcd_contrast);
@ -609,43 +626,45 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(dummy); EEPROM_WRITE(dummy);
#endif #endif
if (!eeprom_write_error) { if (!eeprom_error) {
const int eeprom_size = eeprom_index;
const uint16_t final_checksum = eeprom_checksum, const uint16_t final_crc = working_crc;
eeprom_size = eeprom_index;
// Write the EEPROM header // Write the EEPROM header
eeprom_index = EEPROM_OFFSET; eeprom_index = EEPROM_OFFSET;
EEPROM_WRITE(version); EEPROM_WRITE(version);
EEPROM_WRITE(final_checksum); EEPROM_WRITE(final_crc);
// Report storage size // Report storage size
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR("Settings Stored (", eeprom_size - (EEPROM_OFFSET)); SERIAL_ECHOPAIR("Settings Stored (", eeprom_size - (EEPROM_OFFSET));
SERIAL_ECHOLNPGM(" bytes)"); SERIAL_ECHOPAIR(" bytes; crc ", final_crc);
SERIAL_ECHOLNPGM(")");
} }
#if ENABLED(UBL_SAVE_ACTIVE_ON_M500) #if ENABLED(UBL_SAVE_ACTIVE_ON_M500)
if (ubl.state.eeprom_storage_slot >= 0) if (ubl.state.storage_slot >= 0)
ubl.store_mesh(ubl.state.eeprom_storage_slot); store_mesh(ubl.state.storage_slot);
#endif #endif
return !eeprom_write_error; return !eeprom_error;
} }
/** /**
* M501 - Retrieve Configuration * M501 - Retrieve Configuration
*/ */
bool MarlinSettings::load() { bool MarlinSettings::load() {
uint16_t working_crc = 0;
EEPROM_START(); EEPROM_START();
eeprom_read_error = false; // If set EEPROM_READ won't write into RAM
char stored_ver[4]; char stored_ver[4];
EEPROM_READ(stored_ver); EEPROM_READ(stored_ver);
uint16_t stored_checksum; uint16_t stored_crc;
EEPROM_READ(stored_checksum); EEPROM_READ(stored_crc);
// Version has to match or defaults are used // Version has to match or defaults are used
if (strncmp(version, stored_ver, 3) != 0) { if (strncmp(version, stored_ver, 3) != 0) {
@ -662,7 +681,7 @@ void MarlinSettings::postprocess() {
else { else {
float dummy = 0; float dummy = 0;
eeprom_checksum = 0; // clear before reading first "real data" working_crc = 0; //clear before reading first "real data"
// Number of esteppers may change // Number of esteppers may change
uint8_t esteppers; uint8_t esteppers;
@ -788,7 +807,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
EEPROM_READ(ubl.state.active); EEPROM_READ(ubl.state.active);
EEPROM_READ(ubl.state.z_offset); EEPROM_READ(ubl.state.z_offset);
EEPROM_READ(ubl.state.eeprom_storage_slot); EEPROM_READ(ubl.state.storage_slot);
#else #else
bool dummyb; bool dummyb;
uint8_t dummyui8; uint8_t dummyui8;
@ -868,7 +887,7 @@ void MarlinSettings::postprocess() {
#endif #endif
#if !HAS_LCD_CONTRAST #if !HAS_LCD_CONTRAST
int lcd_contrast; uint16_t lcd_contrast;
#endif #endif
EEPROM_READ(lcd_contrast); EEPROM_READ(lcd_contrast);
@ -960,42 +979,45 @@ void MarlinSettings::postprocess() {
EEPROM_READ(dummy); EEPROM_READ(dummy);
#endif #endif
if (eeprom_checksum == stored_checksum) { if (working_crc == stored_crc) {
if (eeprom_read_error)
reset();
else {
postprocess(); postprocess();
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHO(version); SERIAL_ECHO(version);
SERIAL_ECHOPAIR(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET)); SERIAL_ECHOPAIR(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET));
SERIAL_ECHOLNPGM(" bytes)"); SERIAL_ECHOPAIR(" bytes; crc ", working_crc);
} SERIAL_ECHOLNPGM(")");
} }
else { else {
SERIAL_ERROR_START; SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("EEPROM checksum mismatch"); SERIAL_ERRORPGM("EEPROM CRC mismatch - (stored) ");
SERIAL_ERROR(stored_crc);
SERIAL_ERRORPGM(" != ");
SERIAL_ERROR(working_crc);
SERIAL_ERRORLNPGM(" (calculated)!");
reset(); reset();
} }
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
ubl.eeprom_start = (eeprom_index + 32) & 0xFFF8; // Pad the end of configuration data so it meshes_begin = (eeprom_index + 32) & 0xFFF8; // Pad the end of configuration data so it
// can float up or down a little bit without // can float up or down a little bit without
// disrupting the Unified Bed Leveling data // disrupting the mesh data
SERIAL_ECHOPGM(" UBL "); ubl.report_state();
if (!ubl.state.active) SERIAL_ECHO("not ");
SERIAL_ECHOLNPGM("active!");
if (!ubl.sanity_check()) { if (!ubl.sanity_check()) {
SERIAL_ECHOLNPGM("\nUnified Bed Leveling system initialized.\n"); SERIAL_EOL;
ubl.echo_name();
SERIAL_ECHOLNPGM(" initialized.\n");
} }
else { else {
SERIAL_PROTOCOLPGM("?Unable to enable Unified Bed Leveling system.\n"); SERIAL_PROTOCOLPGM("?Can't enable ");
ubl.echo_name();
SERIAL_PROTOCOLLNPGM(".");
ubl.reset(); ubl.reset();
} }
if (ubl.state.eeprom_storage_slot >= 0) { if (ubl.state.storage_slot >= 0) {
ubl.load_mesh(ubl.state.eeprom_storage_slot); load_mesh(ubl.state.storage_slot);
SERIAL_ECHOPAIR("Mesh ", ubl.state.eeprom_storage_slot); SERIAL_ECHOPAIR("Mesh ", ubl.state.storage_slot);
SERIAL_ECHOLNPGM(" loaded from storage."); SERIAL_ECHOLNPGM(" loaded from storage.");
} }
else { else {
@ -1009,9 +1031,86 @@ void MarlinSettings::postprocess() {
report(); report();
#endif #endif
return !eeprom_read_error; return !eeprom_error;
}
#if ENABLED(AUTO_BED_LEVELING_UBL)
void ubl_invalid_slot(const int s) {
SERIAL_PROTOCOLLNPGM("?Invalid slot.");
SERIAL_PROTOCOL(s);
SERIAL_PROTOCOLLNPGM(" mesh slots available.");
}
int MarlinSettings::calc_num_meshes() {
//obviously this will get more sophisticated once we've added an actual MAT
if (meshes_begin <= 0) return 0;
return (meshes_end - meshes_begin) / sizeof(ubl.z_values);
}
void MarlinSettings::store_mesh(int8_t slot) {
#if ENABLED(AUTO_BED_LEVELING_UBL)
const int a = calc_num_meshes();
if (!WITHIN(slot, 0, a - 1)) {
ubl_invalid_slot(a);
SERIAL_PROTOCOLPAIR("E2END=", E2END);
SERIAL_PROTOCOLPAIR(" meshes_end=", meshes_end);
SERIAL_PROTOCOLLNPAIR(" slot=", slot);
SERIAL_EOL;
return;
} }
uint16_t crc = 0;
int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
// Write crc to MAT along with other data, or just tack on to the beginning or end
SERIAL_PROTOCOLLNPAIR("Mesh saved in slot ", slot);
#else
// Other mesh types
#endif
}
void MarlinSettings::load_mesh(int8_t slot, void *into /* = 0 */) {
#if ENABLED(AUTO_BED_LEVELING_UBL)
const int16_t a = settings.calc_num_meshes();
if (!WITHIN(slot, 0, a - 1)) {
ubl_invalid_slot(a);
return;
}
uint16_t crc = 0;
int pos = meshes_end - (slot + 1) * sizeof(ubl.z_values);
uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&ubl.z_values;
read_data(pos, dest, sizeof(ubl.z_values), &crc);
// Compare crc with crc from MAT, or read from end
SERIAL_PROTOCOLLNPAIR("Mesh loaded from slot ", slot);
#else
// Other mesh types
#endif
}
//void MarlinSettings::delete_mesh() { return; }
//void MarlinSettings::defrag_meshes() { return; }
#endif // AUTO_BED_LEVELING_UBL
#else // !EEPROM_SETTINGS #else // !EEPROM_SETTINGS
bool MarlinSettings::save() { bool MarlinSettings::save() {
@ -1236,19 +1335,17 @@ void MarlinSettings::reset() {
*/ */
CONFIG_ECHO_START; CONFIG_ECHO_START;
#if ENABLED(INCH_MODE_SUPPORT) #if ENABLED(INCH_MODE_SUPPORT)
extern float linear_unit_factor, volumetric_unit_factor; #define LINEAR_UNIT(N) ((N) / parser.linear_unit_factor)
#define LINEAR_UNIT(N) ((N) / linear_unit_factor) #define VOLUMETRIC_UNIT(N) ((N) / (volumetric_enabled ? parser.volumetric_unit_factor : parser.linear_unit_factor))
#define VOLUMETRIC_UNIT(N) ((N) / (volumetric_enabled ? volumetric_unit_factor : linear_unit_factor))
SERIAL_ECHOPGM(" G2"); SERIAL_ECHOPGM(" G2");
SERIAL_CHAR(linear_unit_factor == 1.0 ? '1' : '0'); SERIAL_CHAR(parser.linear_unit_factor == 1.0 ? '1' : '0');
SERIAL_ECHOPGM(" ; Units in "); SERIAL_ECHOPGM(" ; Units in ");
serialprintPGM(linear_unit_factor == 1.0 ? PSTR("mm\n") : PSTR("inches\n")); serialprintPGM(parser.linear_unit_factor == 1.0 ? PSTR("mm\n") : PSTR("inches\n"));
#else #else
#define LINEAR_UNIT(N) N #define LINEAR_UNIT(N) N
#define VOLUMETRIC_UNIT(N) N #define VOLUMETRIC_UNIT(N) N
SERIAL_ECHOLNPGM(" G21 ; Units in mm\n"); SERIAL_ECHOLNPGM(" G21 ; Units in mm");
#endif #endif
SERIAL_EOL;
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -1256,21 +1353,20 @@ void MarlinSettings::reset() {
CONFIG_ECHO_START; CONFIG_ECHO_START;
#if ENABLED(TEMPERATURE_UNITS_SUPPORT) #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
extern TempUnit input_temp_units; #define TEMP_UNIT(N) parser.to_temp_units(N)
extern float to_temp_units(const float &f);
#define TEMP_UNIT(N) to_temp_units(N)
SERIAL_ECHOPGM(" M149 "); SERIAL_ECHOPGM(" M149 ");
SERIAL_CHAR(input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C'); SERIAL_CHAR(parser.temp_units_code());
SERIAL_ECHOPGM(" ; Units in "); SERIAL_ECHOPGM(" ; Units in ");
serialprintPGM(input_temp_units == TEMPUNIT_K ? PSTR("Kelvin\n") : input_temp_units == TEMPUNIT_F ? PSTR("Fahrenheit\n") : PSTR("Celsius\n")); serialprintPGM(parser.temp_units_name());
#else #else
#define TEMP_UNIT(N) N #define TEMP_UNIT(N) N
SERIAL_ECHOLNPGM(" M149 C ; Units in Celsius\n"); SERIAL_ECHOLNPGM(" M149 C ; Units in Celsius");
#endif #endif
SERIAL_EOL;
#endif #endif
SERIAL_EOL;
/** /**
* Volumetric extrusion M200 * Volumetric extrusion M200
*/ */
@ -1365,7 +1461,7 @@ void MarlinSettings::reset() {
#endif #endif
SERIAL_EOL; SERIAL_EOL;
#if ENABLED(DISTINCT_E_FACTORS) #if ENABLED(DISTINCT_E_FACTORS)
SERIAL_ECHO_START; CONFIG_ECHO_START;
for (uint8_t i = 0; i < E_STEPPERS; i++) { for (uint8_t i = 0; i < E_STEPPERS; i++) {
SERIAL_ECHOPAIR(" M201 T", (int)i); SERIAL_ECHOPAIR(" M201 T", (int)i);
SERIAL_ECHOLNPAIR(" E", VOLUMETRIC_UNIT(planner.max_acceleration_mm_per_s2[E_AXIS + i])); SERIAL_ECHOLNPAIR(" E", VOLUMETRIC_UNIT(planner.max_acceleration_mm_per_s2[E_AXIS + i]));
@ -1415,7 +1511,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOPAIR(" M218 T", (int)e); SERIAL_ECHOPAIR(" M218 T", (int)e);
SERIAL_ECHOPAIR(" X", LINEAR_UNIT(hotend_offset[X_AXIS][e])); SERIAL_ECHOPAIR(" X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e])); SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e]));
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER) #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE)
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e])); SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]));
#endif #endif
SERIAL_EOL; SERIAL_EOL;
@ -1429,7 +1525,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Mesh Bed Leveling:"); SERIAL_ECHOLNPGM("Mesh Bed Leveling:");
} }
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M420 S", mbl.has_mesh() ? 1 : 0); SERIAL_ECHOPAIR(" M420 S", leveling_is_valid() ? 1 : 0);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.z_fade_height)); SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.z_fade_height));
#endif #endif
@ -1449,43 +1545,28 @@ void MarlinSettings::reset() {
if (!forReplay) { if (!forReplay) {
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Unified Bed Leveling:"); ubl.echo_name();
SERIAL_ECHOLNPGM(":");
} }
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M420 S", ubl.state.active ? 1 : 0); SERIAL_ECHOPAIR(" M420 S", leveling_is_active() ? 1 : 0);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHOPAIR(" Z", planner.z_fade_height); SERIAL_ECHOPAIR(" Z", planner.z_fade_height);
#endif #endif
SERIAL_EOL; SERIAL_EOL;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOPGM("\nUBL is "); SERIAL_EOL;
ubl.state.active ? SERIAL_CHAR('A') : SERIAL_ECHOPGM("Ina"); ubl.report_state();
SERIAL_ECHOLNPAIR("ctive\n\nActive Mesh Slot: ", ubl.state.eeprom_storage_slot);
SERIAL_ECHOLNPAIR("\nActive Mesh Slot: ", ubl.state.storage_slot);
SERIAL_ECHOPGM("z_offset: "); SERIAL_ECHOPGM("z_offset: ");
SERIAL_ECHO_F(ubl.state.z_offset, 6); SERIAL_ECHO_F(ubl.state.z_offset, 6);
SERIAL_EOL; SERIAL_EOL;
SERIAL_ECHOPAIR("EEPROM can hold ", (int)((UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(ubl.z_values))); SERIAL_ECHOPAIR("EEPROM can hold ", calc_num_meshes());
SERIAL_ECHOLNPGM(" meshes.\n"); SERIAL_ECHOLNPGM(" meshes.\n");
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X);
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y);
SERIAL_ECHOPGM("UBL_MESH_MIN_X " STRINGIFY(UBL_MESH_MIN_X));
SERIAL_ECHOLNPAIR("=", UBL_MESH_MIN_X );
SERIAL_ECHOPGM("UBL_MESH_MIN_Y " STRINGIFY(UBL_MESH_MIN_Y));
SERIAL_ECHOLNPAIR("=", UBL_MESH_MIN_Y );
SERIAL_ECHOPGM("UBL_MESH_MAX_X " STRINGIFY(UBL_MESH_MAX_X));
SERIAL_ECHOLNPAIR("=", UBL_MESH_MAX_X);
SERIAL_ECHOPGM("UBL_MESH_MAX_Y " STRINGIFY(UBL_MESH_MAX_Y));
SERIAL_ECHOLNPAIR("=", UBL_MESH_MAX_Y);
SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST);
SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST);
SERIAL_EOL;
} }
#elif HAS_ABL #elif HAS_ABL
@ -1495,7 +1576,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Auto Bed Leveling:"); SERIAL_ECHOLNPGM("Auto Bed Leveling:");
} }
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M420 S", planner.abl_enabled ? 1 : 0); SERIAL_ECHOPAIR(" M420 S", leveling_is_active() ? 1 : 0);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.z_fade_height)); SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.z_fade_height));
#endif #endif

@ -34,6 +34,18 @@ class MarlinSettings {
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
static bool load(); static bool load();
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
FORCE_INLINE static int get_start_of_meshes() { return meshes_begin; }
FORCE_INLINE static int get_end_of_meshes() { return meshes_end; }
static int calc_num_meshes();
static void store_mesh(int8_t slot);
static void load_mesh(int8_t slot, void *into = 0);
//static void delete_mesh(); // necessary if we have a MAT
//static void defrag_meshes(); // "
#endif
#else #else
FORCE_INLINE FORCE_INLINE
static bool load() { reset(); report(); return true; } static bool load() { reset(); report(); return true; }
@ -50,10 +62,18 @@ class MarlinSettings {
static void postprocess(); static void postprocess();
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
static uint16_t eeprom_checksum; static bool eeprom_error;
static bool eeprom_read_error, eeprom_write_error;
static void write_data(int &pos, const uint8_t* value, uint16_t size); #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
static void read_data(int &pos, uint8_t* value, uint16_t size); // That can store is enabled
static int meshes_begin;
const static int meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
// live at the very end of the eeprom
#endif
static void write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc);
static void read_data(int &pos, uint8_t *value, uint16_t size, uint16_t *crc);
#endif #endif
}; };

@ -108,25 +108,25 @@ enum EndstopEnum {
}; };
#endif #endif
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
enum FilamentChangeMenuResponse { enum AdvancedPauseMenuResponse {
FILAMENT_CHANGE_RESPONSE_WAIT_FOR, ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE, ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
FILAMENT_CHANGE_RESPONSE_RESUME_PRINT ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
}; };
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
enum FilamentChangeMessage { enum AdvancedPauseMessage {
FILAMENT_CHANGE_MESSAGE_INIT, ADVANCED_PAUSE_MESSAGE_INIT,
FILAMENT_CHANGE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MESSAGE_UNLOAD,
FILAMENT_CHANGE_MESSAGE_INSERT, ADVANCED_PAUSE_MESSAGE_INSERT,
FILAMENT_CHANGE_MESSAGE_LOAD, ADVANCED_PAUSE_MESSAGE_LOAD,
FILAMENT_CHANGE_MESSAGE_EXTRUDE, ADVANCED_PAUSE_MESSAGE_EXTRUDE,
FILAMENT_CHANGE_MESSAGE_OPTION, ADVANCED_PAUSE_MESSAGE_OPTION,
FILAMENT_CHANGE_MESSAGE_RESUME, ADVANCED_PAUSE_MESSAGE_RESUME,
FILAMENT_CHANGE_MESSAGE_STATUS, ADVANCED_PAUSE_MESSAGE_STATUS,
FILAMENT_CHANGE_MESSAGE_CLICK_TO_HEAT_NOZZLE, ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
FILAMENT_CHANGE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
}; };
#endif #endif
#endif #endif

@ -130,6 +130,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 3 #define EXTRUDERS 3
@ -138,11 +140,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -167,6 +175,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -874,7 +884,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 30 // X position of hotend #define PAUSE_PARK_X_POS 30 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 10 // Y position of hotend #define PAUSE_PARK_Y_POS 10 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 1 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 1 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
//#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm //#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -858,7 +868,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 2 #define EXTRUDERS 2
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -858,7 +868,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -880,7 +890,8 @@
#define UBL_PROBE_PT_2_Y 25 #define UBL_PROBE_PT_2_Y 25
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 25 #define UBL_PROBE_PT_3_Y 25
#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)
@ -1271,7 +1282,7 @@
// //
// ULTIPANEL as seen on Thingiverse. // ULTIPANEL as seen on Thingiverse.
// //
#define ULTIPANEL //#define ULTIPANEL
// //
// Cartesio UI // Cartesio UI

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -761,22 +766,25 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
#define FILAMENT_CHANGE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #define ADVANCED_PAUSE_FEATURE
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_X_POS 10 // X position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Y_POS 10 // Y position of hotend
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -787,16 +795,16 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume #define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
// @section tmc // @section tmc
@ -1132,11 +1140,64 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
// @section debug
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
#define PINS_DEBUGGING #define PINS_DEBUGGING
// @section extras
/** /**
* Auto-report temperatures with M155 S<seconds> * Auto-report temperatures with M155 S<seconds>
*/ */
@ -1165,4 +1226,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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.5
/**
* 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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -132,6 +132,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -140,11 +142,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -169,6 +177,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -866,7 +876,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
#define MACHINE_UUID "8d083632-40c5-4649-85b8-43d9ae6c5d55" // BQ Hephestos 2 standard config #define MACHINE_UUID "8d083632-40c5-4649-85b8-43d9ae6c5d55" // BQ Hephestos 2 standard config
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -869,7 +879,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -441,6 +443,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
#define LCD_DECIMAL_SMALL_XY #define LCD_DECIMAL_SMALL_XY
@ -738,22 +743,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -764,14 +770,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1109,6 +1115,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1142,4 +1197,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -149,6 +149,8 @@
#define MACHINE_UUID "92f72de1-c211-452e-9f2b-61ef88a4751e" // K8200 standard config without VM8201 (Display) #define MACHINE_UUID "92f72de1-c211-452e-9f2b-61ef88a4751e" // K8200 standard config without VM8201 (Display)
#endif #endif
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -157,11 +159,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -186,6 +194,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -904,7 +914,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -378,6 +378,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -453,6 +455,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -767,22 +772,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS (X_MAX_POS-3) // X position of hotend #define PAUSE_PARK_X_POS (X_MAX_POS-3) // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -793,14 +799,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1138,6 +1144,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1171,4 +1226,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -875,7 +885,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 100 // X position of hotend #define PAUSE_PARK_X_POS 100 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 100 // Y position of hotend #define PAUSE_PARK_Y_POS 100 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 20 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 20 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 5 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 5 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 600 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 600 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 100 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 100 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 2 #define EXTRUDERS 2
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -875,7 +885,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -875,7 +885,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -132,6 +132,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 // Single extruder. Set to 2 for dual extruders #define EXTRUDERS 1 // Single extruder. Set to 2 for dual extruders
@ -140,11 +142,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -169,6 +177,8 @@
#define HOTEND_OFFSET_X {0.0, 36.00} // (in mm) for each extruder, offset of the hotend on the X axis #define HOTEND_OFFSET_X {0.0, 36.00} // (in mm) for each extruder, offset of the hotend on the X axis
#define HOTEND_OFFSET_Y {0.0, 0.00} // (in mm) for each extruder, offset of the hotend on the Y axis #define HOTEND_OFFSET_Y {0.0, 0.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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -874,7 +884,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -76,6 +76,7 @@
#if ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA) #if ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)
//#define DEBUG_SCARA_KINEMATICS //#define DEBUG_SCARA_KINEMATICS
//#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// If movement is choppy try lowering this value // If movement is choppy try lowering this value
#define SCARA_SEGMENTS_PER_SECOND 200 #define SCARA_SEGMENTS_PER_SECOND 200
@ -161,6 +162,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -169,11 +172,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -198,6 +207,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -890,7 +901,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -895,7 +905,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -151,6 +151,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -159,11 +161,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -188,6 +196,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -931,7 +941,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -757,22 +762,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -783,14 +789,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1128,6 +1134,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1161,4 +1216,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -132,6 +132,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -140,11 +142,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -169,6 +177,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -866,7 +876,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -875,7 +885,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -437,10 +447,10 @@
#define DELTA_DIAGONAL_ROD 218.0 // mm #define DELTA_DIAGONAL_ROD 218.0 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS 100.00 //mm // get this value from auto calibrate #define DELTA_RADIUS 100.00 //mm Get this value from auto calibrate
// height from z=0 to home position // height from z=0 to home position
#define DELTA_HEIGHT 295.00 // get this value from auto calibrate - use G33 P1 A at 1st time calibration #define DELTA_HEIGHT 295.00 // get this value from auto calibrate - use G33 P1 at 1st time calibration
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 85.0 #define DELTA_PRINTABLE_RADIUS 85.0
@ -450,8 +460,8 @@
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
#define DELTA_CALIBRATION_MENU #define DELTA_CALIBRATION_MENU
// set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled // set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 if DELTA_AUTO_CALIBRATION enabled
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm #define DELTA_CALIBRATION_RADIUS ((DELTA_PRINTABLE_RADIUS) * 0.869) // mm
// G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
#define DELTA_AUTO_CALIBRATION #define DELTA_AUTO_CALIBRATION
@ -994,7 +1004,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -442,6 +444,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -759,22 +764,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -785,14 +791,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1130,6 +1136,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1163,4 +1218,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -444,10 +454,10 @@
#define DELTA_CARRIAGE_OFFSET 22.0 // mm #define DELTA_CARRIAGE_OFFSET 22.0 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm Get this value from auto calibrate
// height from z=0.00 to home position // height from z=0.00 to home position
#define DELTA_HEIGHT 280 // get this value from auto calibrate - use G33 C-1 at 1st time calibration #define DELTA_HEIGHT 280 // get this value from auto calibrate - use G33 P1 at 1st time calibration
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 85.0 #define DELTA_PRINTABLE_RADIUS 85.0
@ -457,8 +467,8 @@
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU //#define DELTA_CALIBRATION_MENU
// set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled // set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 if DELTA_AUTO_CALIBRATION enabled
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm #define DELTA_CALIBRATION_RADIUS ((DELTA_PRINTABLE_RADIUS) * 0.869) // mm
// G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
//#define DELTA_AUTO_CALIBRATION //#define DELTA_AUTO_CALIBRATION
@ -996,7 +1006,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -442,6 +444,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -758,22 +763,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -784,14 +790,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1129,6 +1135,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1162,4 +1217,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -434,10 +444,10 @@
#define DELTA_CARRIAGE_OFFSET 18.0 // mm #define DELTA_CARRIAGE_OFFSET 18.0 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate // height from z=0.00 to home position #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm Get this value from auto calibrate
// height from z=0.00 to home position // height from z=0.00 to home position
#define DELTA_HEIGHT 250 // get this value from auto calibrate - use G33 C-1 at 1st time calibration #define DELTA_HEIGHT 250 // get this value from auto calibrate - use G33 P1 at 1st time calibration
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 140.0 #define DELTA_PRINTABLE_RADIUS 140.0
@ -446,8 +456,8 @@
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU //#define DELTA_CALIBRATION_MENU
// set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled // set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 if DELTA_AUTO_CALIBRATION enabled
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 28) // mm #define DELTA_CALIBRATION_RADIUS ((DELTA_PRINTABLE_RADIUS) * 0.869) // mm
// G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
//#define DELTA_AUTO_CALIBRATION //#define DELTA_AUTO_CALIBRATION
@ -922,6 +932,10 @@
// at which point movement will be level to the machine's XY plane. // at which point movement will be level to the machine's XY plane.
// The height can be set with M420 Z<height> // The height can be set with M420 Z<height>
//#define ENABLE_LEVELING_FADE_HEIGHT //#define ENABLE_LEVELING_FADE_HEIGHT
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@ -931,8 +945,6 @@
#define GRID_MAX_POINTS_X 9 #define GRID_MAX_POINTS_X 9
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
#define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
#define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
@ -983,7 +995,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -442,6 +444,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -756,22 +761,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -782,14 +788,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1127,6 +1133,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1160,4 +1215,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -434,10 +444,10 @@
#define DELTA_CARRIAGE_OFFSET 19.5 // mm #define DELTA_CARRIAGE_OFFSET 19.5 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm Get this value from auto calibrate
// height from z=0.00 to home position // height from z=0.00 to home position
#define DELTA_HEIGHT 250 // get this value from auto calibrate - use G33 C-1 at 1st time calibration #define DELTA_HEIGHT 250 // get this value from auto calibrate - use G33 P1 at 1st time calibration
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 90.0 #define DELTA_PRINTABLE_RADIUS 90.0
@ -446,8 +456,8 @@
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU //#define DELTA_CALIBRATION_MENU
// set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled // set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 if DELTA_AUTO_CALIBRATION enabled
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 18) // mm #define DELTA_CALIBRATION_RADIUS ((DELTA_PRINTABLE_RADIUS) * 0.869) // mm
// G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
//#define DELTA_AUTO_CALIBRATION //#define DELTA_AUTO_CALIBRATION
@ -920,6 +930,10 @@
// at which point movement will be level to the machine's XY plane. // at which point movement will be level to the machine's XY plane.
// The height can be set with M420 Z<height> // The height can be set with M420 Z<height>
//#define ENABLE_LEVELING_FADE_HEIGHT //#define ENABLE_LEVELING_FADE_HEIGHT
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@ -929,8 +943,6 @@
#define GRID_MAX_POINTS_X 9 #define GRID_MAX_POINTS_X 9
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
#define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
#define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
@ -986,7 +998,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -442,6 +444,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -756,22 +761,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -782,14 +788,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1127,6 +1133,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1160,4 +1215,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -133,6 +133,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -141,11 +143,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -170,6 +178,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -421,10 +431,10 @@
#define DELTA_CARRIAGE_OFFSET 30.0 // mm #define DELTA_CARRIAGE_OFFSET 30.0 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm Get this value from auto calibrate
// height from z=0.00 to home position // height from z=0.00 to home position
#define DELTA_HEIGHT 277 // get this value from auto calibrate - use G33 C-1 at 1st time calibration #define DELTA_HEIGHT 277 // get this value from auto calibrate - use G33 P1 at 1st time calibration
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 127.0 #define DELTA_PRINTABLE_RADIUS 127.0
@ -433,8 +443,8 @@
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU //#define DELTA_CALIBRATION_MENU
// set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled // set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 if DELTA_AUTO_CALIBRATION enabled
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 25.4) // mm #define DELTA_CALIBRATION_RADIUS ((DELTA_PRINTABLE_RADIUS) * 0.869) // mm
// G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
//#define DELTA_AUTO_CALIBRATION //#define DELTA_AUTO_CALIBRATION
@ -926,6 +936,10 @@
// at which point movement will be level to the machine's XY plane. // at which point movement will be level to the machine's XY plane.
// The height can be set with M420 Z<height> // The height can be set with M420 Z<height>
//#define ENABLE_LEVELING_FADE_HEIGHT //#define ENABLE_LEVELING_FADE_HEIGHT
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@ -935,8 +949,6 @@
#define GRID_MAX_POINTS_X 7 #define GRID_MAX_POINTS_X 7
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 25)
#define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
#define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
#define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
@ -992,7 +1004,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -370,6 +370,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -447,6 +449,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -761,22 +766,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -787,14 +793,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1132,6 +1138,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1165,4 +1220,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -439,10 +449,10 @@
#define DELTA_CARRIAGE_OFFSET 22.0 // mm #define DELTA_CARRIAGE_OFFSET 22.0 // mm
// Horizontal distance bridged by diagonal push rods when effector is centered. // Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm Get this value from auto calibrate
// height from z=0.00 to home position // height from z=0.00 to home position
#define DELTA_HEIGHT 380 // get this value from auto calibrate - use G33 C-1 at 1st time calibration #define DELTA_HEIGHT 380 // get this value from auto calibrate - use G33 P1 at 1st time calibration
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 140.0 #define DELTA_PRINTABLE_RADIUS 140.0
@ -451,8 +461,8 @@
// See http://minow.blogspot.com/index.html#4918805519571907051 // See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU //#define DELTA_CALIBRATION_MENU
// set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled // set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS*0.869 if DELTA_AUTO_CALIBRATION enabled
#define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 28) // mm #define DELTA_CALIBRATION_RADIUS ((DELTA_PRINTABLE_RADIUS) * 0.869) // mm
// G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
//#define DELTA_AUTO_CALIBRATION //#define DELTA_AUTO_CALIBRATION
@ -989,6 +999,10 @@
// at which point movement will be level to the machine's XY plane. // at which point movement will be level to the machine's XY plane.
// The height can be set with M420 Z<height> // The height can be set with M420 Z<height>
//#define ENABLE_LEVELING_FADE_HEIGHT //#define ENABLE_LEVELING_FADE_HEIGHT
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@ -998,8 +1012,6 @@
#define GRID_MAX_POINTS_X 5 #define GRID_MAX_POINTS_X 5
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
#define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
#define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
#define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
#define FRONT_PROBE_BED_POSITION - (DELTA_PROBEABLE_RADIUS - 20) #define FRONT_PROBE_BED_POSITION - (DELTA_PROBEABLE_RADIUS - 20)
@ -1050,7 +1062,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -442,6 +444,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -756,22 +761,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -782,14 +788,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1127,6 +1133,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1160,4 +1215,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -134,6 +134,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -142,11 +144,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -171,6 +179,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -892,7 +902,8 @@
#define UBL_PROBE_PT_2_Y 63 #define UBL_PROBE_PT_2_Y 63
#define UBL_PROBE_PT_3_X 348 #define UBL_PROBE_PT_3_X 348
#define UBL_PROBE_PT_3_Y 211 #define UBL_PROBE_PT_3_Y 211
#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -761,22 +766,25 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
#define FILAMENT_CHANGE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #define ADVANCED_PAUSE_FEATURE
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_X_POS 75 // X position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Y_POS 75 // Y position of hotend
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -787,14 +795,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume #define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1132,6 +1140,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1165,4 +1222,41 @@
*/ */
#define NO_WORKSPACE_OFFSETS #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.5
/**
* 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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -878,7 +888,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // 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" //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -871,7 +881,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -754,22 +759,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -780,14 +786,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1125,6 +1131,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1158,4 +1213,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,6 +129,8 @@
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
//#define MACHINE_UUID "5f0bb7a3-0e14-428c-812b-15ab0d3ecc71" //#define MACHINE_UUID "5f0bb7a3-0e14-428c-812b-15ab0d3ecc71"
// @section extruder
// This defines the number of extruders // This defines the number of extruders
// :[1, 2, 3, 4, 5] // :[1, 2, 3, 4, 5]
#define EXTRUDERS 1 #define EXTRUDERS 1
@ -137,11 +139,17 @@
//#define SINGLENOZZLE //#define SINGLENOZZLE
// A dual extruder that uses a single stepper motor // A dual extruder that uses a single stepper motor
// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z
//#define SWITCHING_EXTRUDER //#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
#define SWITCHING_EXTRUDER_SERVO_NR 0 #define SWITCHING_EXTRUDER_SERVO_NR 0
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
#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 } //#define HOTEND_OFFSET_Z { 0.0, 0.0 }
#endif #endif
@ -166,6 +174,8 @@
//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#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 //#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 * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
* *
@ -880,7 +890,8 @@
#define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_2_Y 20
#define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_X 180
#define UBL_PROBE_PT_3_Y 20 #define UBL_PROBE_PT_3_Y 20
//#define UBL_G26_MESH_EDITING // Enable G26 mesh editing #define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)

@ -365,6 +365,8 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0 #define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// @section lcd // @section lcd
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -440,6 +442,9 @@
// Include a page of printer information in the LCD Main Menu // Include a page of printer information in the LCD Main Menu
#define LCD_INFO_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 // On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY //#define LCD_DECIMAL_SMALL_XY
@ -757,22 +762,23 @@
#endif #endif
/** /**
* Filament Change * Advanced Pause
* Experimental filament change support. * Experimental feature for filament change support and for parking the nozzle when paused.
* Adds the GCode M600 for initiating filament change. * 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 an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT. * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/ */
//#define FILAMENT_CHANGE_FEATURE //#define ADVANCED_PAUSE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend #define PAUSE_PARK_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend #define PAUSE_PARK_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) #define PAUSE_PARK_Z_ADD 10 // Z addition of hotend (lift)
#define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) #define PAUSE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #define PAUSE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s #define PAUSE_PARK_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm #define PAUSE_PARK_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position // It is a short retract used immediately after print interrupt before move to filament exchange position
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
@ -783,14 +789,14 @@
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used // Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend, #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is loaded over the hotend,
// 0 to disable for manual extrusion // 0 to disable for manual extrusion
// Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
// or until outcoming filament color is not clear for filament color change // or until outcoming filament color is not clear for filament color change
#define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
#define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
#define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
// even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME. // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
//#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
#endif #endif
@ -1128,6 +1134,55 @@
//#define EXPERIMENTAL_I2CBUS //#define EXPERIMENTAL_I2CBUS
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave #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
/** /**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/ */
@ -1161,4 +1216,41 @@
*/ */
//#define NO_WORKSPACE_OFFSETS //#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_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
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

File diff suppressed because it is too large Load Diff

@ -0,0 +1,1115 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Pin mapping for the 1280 and 2560
*
* 1280 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
* Marlin 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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
*/
#ifndef _FASTIO_1280
#define _FASTIO_1280
#include "fastio.h"
// change for your board
#define DEBUG_LED DIO21
// UART
#define RXD DIO0
#define TXD DIO1
// SPI
#define SCK DIO52
#define MISO DIO50
#define MOSI DIO51
#define SS DIO53
// TWI (I2C)
#define SCL DIO21
#define SDA DIO20
// Timers and PWM
#define OC0A DIO13
#define OC0B DIO4
#define OC1A DIO11
#define OC1B DIO12
#define OC2A DIO10
#define OC2B DIO9
#define OC3A DIO5
#define OC3B DIO2
#define OC3C DIO3
#define OC4A DIO6
#define OC4B DIO7
#define OC4C DIO8
#define OC5A DIO46
#define OC5B DIO45
#define OC5C DIO44
// Digital I/O
#define DIO0_PIN PINE0
#define DIO0_RPORT PINE
#define DIO0_WPORT PORTE
#define DIO0_DDR DDRE
#define DIO0_PWM NULL
#define DIO1_PIN PINE1
#define DIO1_RPORT PINE
#define DIO1_WPORT PORTE
#define DIO1_DDR DDRE
#define DIO1_PWM NULL
#define DIO2_PIN PINE4
#define DIO2_RPORT PINE
#define DIO2_WPORT PORTE
#define DIO2_DDR DDRE
#define DIO2_PWM &OCR3BL
#define DIO3_PIN PINE5
#define DIO3_RPORT PINE
#define DIO3_WPORT PORTE
#define DIO3_DDR DDRE
#define DIO3_PWM &OCR3CL
#define DIO4_PIN PING5
#define DIO4_RPORT PING
#define DIO4_WPORT PORTG
#define DIO4_DDR DDRG
#define DIO4_PWM &OCR0B
#define DIO5_PIN PINE3
#define DIO5_RPORT PINE
#define DIO5_WPORT PORTE
#define DIO5_DDR DDRE
#define DIO5_PWM &OCR3AL
#define DIO6_PIN PINH3
#define DIO6_RPORT PINH
#define DIO6_WPORT PORTH
#define DIO6_DDR DDRH
#define DIO6_PWM &OCR4AL
#define DIO7_PIN PINH4
#define DIO7_RPORT PINH
#define DIO7_WPORT PORTH
#define DIO7_DDR DDRH
#define DIO7_PWM &OCR4BL
#define DIO8_PIN PINH5
#define DIO8_RPORT PINH
#define DIO8_WPORT PORTH
#define DIO8_DDR DDRH
#define DIO8_PWM &OCR4CL
#define DIO9_PIN PINH6
#define DIO9_RPORT PINH
#define DIO9_WPORT PORTH
#define DIO9_DDR DDRH
#define DIO9_PWM &OCR2B
#define DIO10_PIN PINB4
#define DIO10_RPORT PINB
#define DIO10_WPORT PORTB
#define DIO10_DDR DDRB
#define DIO10_PWM &OCR2A
#define DIO11_PIN PINB5
#define DIO11_RPORT PINB
#define DIO11_WPORT PORTB
#define DIO11_DDR DDRB
#define DIO11_PWM NULL
#define DIO12_PIN PINB6
#define DIO12_RPORT PINB
#define DIO12_WPORT PORTB
#define DIO12_DDR DDRB
#define DIO12_PWM NULL
#define DIO13_PIN PINB7
#define DIO13_RPORT PINB
#define DIO13_WPORT PORTB
#define DIO13_DDR DDRB
#define DIO13_PWM &OCR0A
#define DIO14_PIN PINJ1
#define DIO14_RPORT PINJ
#define DIO14_WPORT PORTJ
#define DIO14_DDR DDRJ
#define DIO14_PWM NULL
#define DIO15_PIN PINJ0
#define DIO15_RPORT PINJ
#define DIO15_WPORT PORTJ
#define DIO15_DDR DDRJ
#define DIO15_PWM NULL
#define DIO16_PIN PINH1
#define DIO16_RPORT PINH
#define DIO16_WPORT PORTH
#define DIO16_DDR DDRH
#define DIO16_PWM NULL
#define DIO17_PIN PINH0
#define DIO17_RPORT PINH
#define DIO17_WPORT PORTH
#define DIO17_DDR DDRH
#define DIO17_PWM NULL
#define DIO18_PIN PIND3
#define DIO18_RPORT PIND
#define DIO18_WPORT PORTD
#define DIO18_DDR DDRD
#define DIO18_PWM NULL
#define DIO19_PIN PIND2
#define DIO19_RPORT PIND
#define DIO19_WPORT PORTD
#define DIO19_DDR DDRD
#define DIO19_PWM NULL
#define DIO20_PIN PIND1
#define DIO20_RPORT PIND
#define DIO20_WPORT PORTD
#define DIO20_DDR DDRD
#define DIO20_PWM NULL
#define DIO21_PIN PIND0
#define DIO21_RPORT PIND
#define DIO21_WPORT PORTD
#define DIO21_DDR DDRD
#define DIO21_PWM NULL
#define DIO22_PIN PINA0
#define DIO22_RPORT PINA
#define DIO22_WPORT PORTA
#define DIO22_DDR DDRA
#define DIO22_PWM NULL
#define DIO23_PIN PINA1
#define DIO23_RPORT PINA
#define DIO23_WPORT PORTA
#define DIO23_DDR DDRA
#define DIO23_PWM NULL
#define DIO24_PIN PINA2
#define DIO24_RPORT PINA
#define DIO24_WPORT PORTA
#define DIO24_DDR DDRA
#define DIO24_PWM NULL
#define DIO25_PIN PINA3
#define DIO25_RPORT PINA
#define DIO25_WPORT PORTA
#define DIO25_DDR DDRA
#define DIO25_PWM NULL
#define DIO26_PIN PINA4
#define DIO26_RPORT PINA
#define DIO26_WPORT PORTA
#define DIO26_DDR DDRA
#define DIO26_PWM NULL
#define DIO27_PIN PINA5
#define DIO27_RPORT PINA
#define DIO27_WPORT PORTA
#define DIO27_DDR DDRA
#define DIO27_PWM NULL
#define DIO28_PIN PINA6
#define DIO28_RPORT PINA
#define DIO28_WPORT PORTA
#define DIO28_DDR DDRA
#define DIO28_PWM NULL
#define DIO29_PIN PINA7
#define DIO29_RPORT PINA
#define DIO29_WPORT PORTA
#define DIO29_DDR DDRA
#define DIO29_PWM NULL
#define DIO30_PIN PINC7
#define DIO30_RPORT PINC
#define DIO30_WPORT PORTC
#define DIO30_DDR DDRC
#define DIO30_PWM NULL
#define DIO31_PIN PINC6
#define DIO31_RPORT PINC
#define DIO31_WPORT PORTC
#define DIO31_DDR DDRC
#define DIO31_PWM NULL
#define DIO32_PIN PINC5
#define DIO32_RPORT PINC
#define DIO32_WPORT PORTC
#define DIO32_DDR DDRC
#define DIO32_PWM NULL
#define DIO33_PIN PINC4
#define DIO33_RPORT PINC
#define DIO33_WPORT PORTC
#define DIO33_DDR DDRC
#define DIO33_PWM NULL
#define DIO34_PIN PINC3
#define DIO34_RPORT PINC
#define DIO34_WPORT PORTC
#define DIO34_DDR DDRC
#define DIO34_PWM NULL
#define DIO35_PIN PINC2
#define DIO35_RPORT PINC
#define DIO35_WPORT PORTC
#define DIO35_DDR DDRC
#define DIO35_PWM NULL
#define DIO36_PIN PINC1
#define DIO36_RPORT PINC
#define DIO36_WPORT PORTC
#define DIO36_DDR DDRC
#define DIO36_PWM NULL
#define DIO37_PIN PINC0
#define DIO37_RPORT PINC
#define DIO37_WPORT PORTC
#define DIO37_DDR DDRC
#define DIO37_PWM NULL
#define DIO38_PIN PIND7
#define DIO38_RPORT PIND
#define DIO38_WPORT PORTD
#define DIO38_DDR DDRD
#define DIO38_PWM NULL
#define DIO39_PIN PING2
#define DIO39_RPORT PING
#define DIO39_WPORT PORTG
#define DIO39_DDR DDRG
#define DIO39_PWM NULL
#define DIO40_PIN PING1
#define DIO40_RPORT PING
#define DIO40_WPORT PORTG
#define DIO40_DDR DDRG
#define DIO40_PWM NULL
#define DIO41_PIN PING0
#define DIO41_RPORT PING
#define DIO41_WPORT PORTG
#define DIO41_DDR DDRG
#define DIO41_PWM NULL
#define DIO42_PIN PINL7
#define DIO42_RPORT PINL
#define DIO42_WPORT PORTL
#define DIO42_DDR DDRL
#define DIO42_PWM NULL
#define DIO43_PIN PINL6
#define DIO43_RPORT PINL
#define DIO43_WPORT PORTL
#define DIO43_DDR DDRL
#define DIO43_PWM NULL
#define DIO44_PIN PINL5
#define DIO44_RPORT PINL
#define DIO44_WPORT PORTL
#define DIO44_DDR DDRL
#define DIO44_PWM &OCR5CL
#define DIO45_PIN PINL4
#define DIO45_RPORT PINL
#define DIO45_WPORT PORTL
#define DIO45_DDR DDRL
#define DIO45_PWM &OCR5BL
#define DIO46_PIN PINL3
#define DIO46_RPORT PINL
#define DIO46_WPORT PORTL
#define DIO46_DDR DDRL
#define DIO46_PWM &OCR5AL
#define DIO47_PIN PINL2
#define DIO47_RPORT PINL
#define DIO47_WPORT PORTL
#define DIO47_DDR DDRL
#define DIO47_PWM NULL
#define DIO48_PIN PINL1
#define DIO48_RPORT PINL
#define DIO48_WPORT PORTL
#define DIO48_DDR DDRL
#define DIO48_PWM NULL
#define DIO49_PIN PINL0
#define DIO49_RPORT PINL
#define DIO49_WPORT PORTL
#define DIO49_DDR DDRL
#define DIO49_PWM NULL
#define DIO50_PIN PINB3
#define DIO50_RPORT PINB
#define DIO50_WPORT PORTB
#define DIO50_DDR DDRB
#define DIO50_PWM NULL
#define DIO51_PIN PINB2
#define DIO51_RPORT PINB
#define DIO51_WPORT PORTB
#define DIO51_DDR DDRB
#define DIO51_PWM NULL
#define DIO52_PIN PINB1
#define DIO52_RPORT PINB
#define DIO52_WPORT PORTB
#define DIO52_DDR DDRB
#define DIO52_PWM NULL
#define DIO53_PIN PINB0
#define DIO53_RPORT PINB
#define DIO53_WPORT PORTB
#define DIO53_DDR DDRB
#define DIO53_PWM NULL
#define DIO54_PIN PINF0
#define DIO54_RPORT PINF
#define DIO54_WPORT PORTF
#define DIO54_DDR DDRF
#define DIO54_PWM NULL
#define DIO55_PIN PINF1
#define DIO55_RPORT PINF
#define DIO55_WPORT PORTF
#define DIO55_DDR DDRF
#define DIO55_PWM NULL
#define DIO56_PIN PINF2
#define DIO56_RPORT PINF
#define DIO56_WPORT PORTF
#define DIO56_DDR DDRF
#define DIO56_PWM NULL
#define DIO57_PIN PINF3
#define DIO57_RPORT PINF
#define DIO57_WPORT PORTF
#define DIO57_DDR DDRF
#define DIO57_PWM NULL
#define DIO58_PIN PINF4
#define DIO58_RPORT PINF
#define DIO58_WPORT PORTF
#define DIO58_DDR DDRF
#define DIO58_PWM NULL
#define DIO59_PIN PINF5
#define DIO59_RPORT PINF
#define DIO59_WPORT PORTF
#define DIO59_DDR DDRF
#define DIO59_PWM NULL
#define DIO60_PIN PINF6
#define DIO60_RPORT PINF
#define DIO60_WPORT PORTF
#define DIO60_DDR DDRF
#define DIO60_PWM NULL
#define DIO61_PIN PINF7
#define DIO61_RPORT PINF
#define DIO61_WPORT PORTF
#define DIO61_DDR DDRF
#define DIO61_PWM NULL
#define DIO62_PIN PINK0
#define DIO62_RPORT PINK
#define DIO62_WPORT PORTK
#define DIO62_DDR DDRK
#define DIO62_PWM NULL
#define DIO63_PIN PINK1
#define DIO63_RPORT PINK
#define DIO63_WPORT PORTK
#define DIO63_DDR DDRK
#define DIO63_PWM NULL
#define DIO64_PIN PINK2
#define DIO64_RPORT PINK
#define DIO64_WPORT PORTK
#define DIO64_DDR DDRK
#define DIO64_PWM NULL
#define DIO65_PIN PINK3
#define DIO65_RPORT PINK
#define DIO65_WPORT PORTK
#define DIO65_DDR DDRK
#define DIO65_PWM NULL
#define DIO66_PIN PINK4
#define DIO66_RPORT PINK
#define DIO66_WPORT PORTK
#define DIO66_DDR DDRK
#define DIO66_PWM NULL
#define DIO67_PIN PINK5
#define DIO67_RPORT PINK
#define DIO67_WPORT PORTK
#define DIO67_DDR DDRK
#define DIO67_PWM NULL
#define DIO68_PIN PINK6
#define DIO68_RPORT PINK
#define DIO68_WPORT PORTK
#define DIO68_DDR DDRK
#define DIO68_PWM NULL
#define DIO69_PIN PINK7
#define DIO69_RPORT PINK
#define DIO69_WPORT PORTK
#define DIO69_DDR DDRK
#define DIO69_PWM NULL
#define DIO70_PIN PING4
#define DIO70_RPORT PING
#define DIO70_WPORT PORTG
#define DIO70_DDR DDRG
#define DIO70_PWM NULL
#define DIO71_PIN PING3
#define DIO71_RPORT PING
#define DIO71_WPORT PORTG
#define DIO71_DDR DDRG
#define DIO71_PWM NULL
#define DIO72_PIN PINJ2
#define DIO72_RPORT PINJ
#define DIO72_WPORT PORTJ
#define DIO72_DDR DDRJ
#define DIO72_PWM NULL
#define DIO73_PIN PINJ3
#define DIO73_RPORT PINJ
#define DIO73_WPORT PORTJ
#define DIO73_DDR DDRJ
#define DIO73_PWM NULL
#define DIO74_PIN PINJ7
#define DIO74_RPORT PINJ
#define DIO74_WPORT PORTJ
#define DIO74_DDR DDRJ
#define DIO74_PWM NULL
#define DIO75_PIN PINJ4
#define DIO75_RPORT PINJ
#define DIO75_WPORT PORTJ
#define DIO75_DDR DDRJ
#define DIO75_PWM NULL
#define DIO76_PIN PINJ5
#define DIO76_RPORT PINJ
#define DIO76_WPORT PORTJ
#define DIO76_DDR DDRJ
#define DIO76_PWM NULL
#define DIO77_PIN PINJ6
#define DIO77_RPORT PINJ
#define DIO77_WPORT PORTJ
#define DIO77_DDR DDRJ
#define DIO77_PWM NULL
#define DIO78_PIN PINE2
#define DIO78_RPORT PINE
#define DIO78_WPORT PORTE
#define DIO78_DDR DDRE
#define DIO78_PWM NULL
#define DIO79_PIN PINE6
#define DIO79_RPORT PINE
#define DIO79_WPORT PORTE
#define DIO79_DDR DDRE
#define DIO79_PWM NULL
#define DIO80_PIN PINE7
#define DIO80_RPORT PINE
#define DIO80_WPORT PORTE
#define DIO80_DDR DDRE
#define DIO80_PWM NULL
#define DIO81_PIN PIND4
#define DIO81_RPORT PIND
#define DIO81_WPORT PORTD
#define DIO81_DDR DDRD
#define DIO81_PWM NULL
#define DIO82_PIN PIND5
#define DIO82_RPORT PIND
#define DIO82_WPORT PORTD
#define DIO82_DDR DDRD
#define DIO82_PWM NULL
#define DIO83_PIN PIND6
#define DIO83_RPORT PIND
#define DIO83_WPORT PORTD
#define DIO83_DDR DDRD
#define DIO83_PWM NULL
#define DIO84_PIN PINH2
#define DIO84_RPORT PINH
#define DIO84_WPORT PORTH
#define DIO84_DDR DDRH
#define DIO84_PWM NULL
#define DIO85_PIN PINH7
#define DIO85_RPORT PINH
#define DIO85_WPORT PORTH
#define DIO85_DDR DDRH
#define DIO85_PWM NULL
#undef PA0
#define PA0_PIN PINA0
#define PA0_RPORT PINA
#define PA0_WPORT PORTA
#define PA0_DDR DDRA
#define PA0_PWM NULL
#undef PA1
#define PA1_PIN PINA1
#define PA1_RPORT PINA
#define PA1_WPORT PORTA
#define PA1_DDR DDRA
#define PA1_PWM NULL
#undef PA2
#define PA2_PIN PINA2
#define PA2_RPORT PINA
#define PA2_WPORT PORTA
#define PA2_DDR DDRA
#define PA2_PWM NULL
#undef PA3
#define PA3_PIN PINA3
#define PA3_RPORT PINA
#define PA3_WPORT PORTA
#define PA3_DDR DDRA
#define PA3_PWM NULL
#undef PA4
#define PA4_PIN PINA4
#define PA4_RPORT PINA
#define PA4_WPORT PORTA
#define PA4_DDR DDRA
#define PA4_PWM NULL
#undef PA5
#define PA5_PIN PINA5
#define PA5_RPORT PINA
#define PA5_WPORT PORTA
#define PA5_DDR DDRA
#define PA5_PWM NULL
#undef PA6
#define PA6_PIN PINA6
#define PA6_RPORT PINA
#define PA6_WPORT PORTA
#define PA6_DDR DDRA
#define PA6_PWM NULL
#undef PA7
#define PA7_PIN PINA7
#define PA7_RPORT PINA
#define PA7_WPORT PORTA
#define PA7_DDR DDRA
#define PA7_PWM NULL
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_DDR DDRB
#define PB0_PWM NULL
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_DDR DDRB
#define PB1_PWM NULL
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_DDR DDRB
#define PB2_PWM NULL
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_DDR DDRB
#define PB3_PWM NULL
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_DDR DDRB
#define PB4_PWM &OCR2A
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_DDR DDRB
#define PB5_PWM NULL
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_DDR DDRB
#define PB6_PWM NULL
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_DDR DDRB
#define PB7_PWM &OCR0A
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_DDR DDRC
#define PC0_PWM NULL
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_DDR DDRC
#define PC1_PWM NULL
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_DDR DDRC
#define PC2_PWM NULL
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_DDR DDRC
#define PC3_PWM NULL
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_DDR DDRC
#define PC4_PWM NULL
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_DDR DDRC
#define PC5_PWM NULL
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_DDR DDRC
#define PC6_PWM NULL
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_DDR DDRC
#define PC7_PWM NULL
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_DDR DDRD
#define PD0_PWM NULL
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_DDR DDRD
#define PD1_PWM NULL
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_DDR DDRD
#define PD2_PWM NULL
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_DDR DDRD
#define PD3_PWM NULL
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_DDR DDRD
#define PD4_PWM NULL
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_DDR DDRD
#define PD5_PWM NULL
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_DDR DDRD
#define PD6_PWM NULL
#undef PD7
#define PD7_PIN PIND7
#define PD7_RPORT PIND
#define PD7_WPORT PORTD
#define PD7_DDR DDRD
#define PD7_PWM NULL
#undef PE0
#define PE0_PIN PINE0
#define PE0_RPORT PINE
#define PE0_WPORT PORTE
#define PE0_DDR DDRE
#define PE0_PWM NULL
#undef PE1
#define PE1_PIN PINE1
#define PE1_RPORT PINE
#define PE1_WPORT PORTE
#define PE1_DDR DDRE
#define PE1_PWM NULL
#undef PE2
#define PE2_PIN PINE2
#define PE2_RPORT PINE
#define PE2_WPORT PORTE
#define PE2_DDR DDRE
#define PE2_PWM NULL
#undef PE3
#define PE3_PIN PINE3
#define PE3_RPORT PINE
#define PE3_WPORT PORTE
#define PE3_DDR DDRE
#define PE3_PWM &OCR3AL
#undef PE4
#define PE4_PIN PINE4
#define PE4_RPORT PINE
#define PE4_WPORT PORTE
#define PE4_DDR DDRE
#define PE4_PWM &OCR3BL
#undef PE5
#define PE5_PIN PINE5
#define PE5_RPORT PINE
#define PE5_WPORT PORTE
#define PE5_DDR DDRE
#define PE5_PWM &OCR3CL
#undef PE6
#define PE6_PIN PINE6
#define PE6_RPORT PINE
#define PE6_WPORT PORTE
#define PE6_DDR DDRE
#define PE6_PWM NULL
#undef PE7
#define PE7_PIN PINE7
#define PE7_RPORT PINE
#define PE7_WPORT PORTE
#define PE7_DDR DDRE
#define PE7_PWM NULL
#undef PF0
#define PF0_PIN PINF0
#define PF0_RPORT PINF
#define PF0_WPORT PORTF
#define PF0_DDR DDRF
#define PF0_PWM NULL
#undef PF1
#define PF1_PIN PINF1
#define PF1_RPORT PINF
#define PF1_WPORT PORTF
#define PF1_DDR DDRF
#define PF1_PWM NULL
#undef PF2
#define PF2_PIN PINF2
#define PF2_RPORT PINF
#define PF2_WPORT PORTF
#define PF2_DDR DDRF
#define PF2_PWM NULL
#undef PF3
#define PF3_PIN PINF3
#define PF3_RPORT PINF
#define PF3_WPORT PORTF
#define PF3_DDR DDRF
#define PF3_PWM NULL
#undef PF4
#define PF4_PIN PINF4
#define PF4_RPORT PINF
#define PF4_WPORT PORTF
#define PF4_DDR DDRF
#define PF4_PWM NULL
#undef PF5
#define PF5_PIN PINF5
#define PF5_RPORT PINF
#define PF5_WPORT PORTF
#define PF5_DDR DDRF
#define PF5_PWM NULL
#undef PF6
#define PF6_PIN PINF6
#define PF6_RPORT PINF
#define PF6_WPORT PORTF
#define PF6_DDR DDRF
#define PF6_PWM NULL
#undef PF7
#define PF7_PIN PINF7
#define PF7_RPORT PINF
#define PF7_WPORT PORTF
#define PF7_DDR DDRF
#define PF7_PWM NULL
#undef PG0
#define PG0_PIN PING0
#define PG0_RPORT PING
#define PG0_WPORT PORTG
#define PG0_DDR DDRG
#define PG0_PWM NULL
#undef PG1
#define PG1_PIN PING1
#define PG1_RPORT PING
#define PG1_WPORT PORTG
#define PG1_DDR DDRG
#define PG1_PWM NULL
#undef PG2
#define PG2_PIN PING2
#define PG2_RPORT PING
#define PG2_WPORT PORTG
#define PG2_DDR DDRG
#define PG2_PWM NULL
#undef PG3
#define PG3_PIN PING3
#define PG3_RPORT PING
#define PG3_WPORT PORTG
#define PG3_DDR DDRG
#define PG3_PWM NULL
#undef PG4
#define PG4_PIN PING4
#define PG4_RPORT PING
#define PG4_WPORT PORTG
#define PG4_DDR DDRG
#define PG4_PWM NULL
#undef PG5
#define PG5_PIN PING5
#define PG5_RPORT PING
#define PG5_WPORT PORTG
#define PG5_DDR DDRG
#define PG5_PWM &OCR0B
#undef PH0
#define PH0_PIN PINH0
#define PH0_RPORT PINH
#define PH0_WPORT PORTH
#define PH0_DDR DDRH
#define PH0_PWM NULL
#undef PH1
#define PH1_PIN PINH1
#define PH1_RPORT PINH
#define PH1_WPORT PORTH
#define PH1_DDR DDRH
#define PH1_PWM NULL
#undef PH2
#define PH2_PIN PINH2
#define PH2_RPORT PINH
#define PH2_WPORT PORTH
#define PH2_DDR DDRH
#define PH2_PWM NULL
#undef PH3
#define PH3_PIN PINH3
#define PH3_RPORT PINH
#define PH3_WPORT PORTH
#define PH3_DDR DDRH
#define PH3_PWM &OCR4AL
#undef PH4
#define PH4_PIN PINH4
#define PH4_RPORT PINH
#define PH4_WPORT PORTH
#define PH4_DDR DDRH
#define PH4_PWM &OCR4BL
#undef PH5
#define PH5_PIN PINH5
#define PH5_RPORT PINH
#define PH5_WPORT PORTH
#define PH5_DDR DDRH
#define PH5_PWM &OCR4CL
#undef PH6
#define PH6_PIN PINH6
#define PH6_RPORT PINH
#define PH6_WPORT PORTH
#define PH6_DDR DDRH
#define PH6_PWM &OCR2B
#undef PH7
#define PH7_PIN PINH7
#define PH7_RPORT PINH
#define PH7_WPORT PORTH
#define PH7_DDR DDRH
#define PH7_PWM NULL
#undef PJ0
#define PJ0_PIN PINJ0
#define PJ0_RPORT PINJ
#define PJ0_WPORT PORTJ
#define PJ0_DDR DDRJ
#define PJ0_PWM NULL
#undef PJ1
#define PJ1_PIN PINJ1
#define PJ1_RPORT PINJ
#define PJ1_WPORT PORTJ
#define PJ1_DDR DDRJ
#define PJ1_PWM NULL
#undef PJ2
#define PJ2_PIN PINJ2
#define PJ2_RPORT PINJ
#define PJ2_WPORT PORTJ
#define PJ2_DDR DDRJ
#define PJ2_PWM NULL
#undef PJ3
#define PJ3_PIN PINJ3
#define PJ3_RPORT PINJ
#define PJ3_WPORT PORTJ
#define PJ3_DDR DDRJ
#define PJ3_PWM NULL
#undef PJ4
#define PJ4_PIN PINJ4
#define PJ4_RPORT PINJ
#define PJ4_WPORT PORTJ
#define PJ4_DDR DDRJ
#define PJ4_PWM NULL
#undef PJ5
#define PJ5_PIN PINJ5
#define PJ5_RPORT PINJ
#define PJ5_WPORT PORTJ
#define PJ5_DDR DDRJ
#define PJ5_PWM NULL
#undef PJ6
#define PJ6_PIN PINJ6
#define PJ6_RPORT PINJ
#define PJ6_WPORT PORTJ
#define PJ6_DDR DDRJ
#define PJ6_PWM NULL
#undef PJ7
#define PJ7_PIN PINJ7
#define PJ7_RPORT PINJ
#define PJ7_WPORT PORTJ
#define PJ7_DDR DDRJ
#define PJ7_PWM NULL
#undef PK0
#define PK0_PIN PINK0
#define PK0_RPORT PINK
#define PK0_WPORT PORTK
#define PK0_DDR DDRK
#define PK0_PWM NULL
#undef PK1
#define PK1_PIN PINK1
#define PK1_RPORT PINK
#define PK1_WPORT PORTK
#define PK1_DDR DDRK
#define PK1_PWM NULL
#undef PK2
#define PK2_PIN PINK2
#define PK2_RPORT PINK
#define PK2_WPORT PORTK
#define PK2_DDR DDRK
#define PK2_PWM NULL
#undef PK3
#define PK3_PIN PINK3
#define PK3_RPORT PINK
#define PK3_WPORT PORTK
#define PK3_DDR DDRK
#define PK3_PWM NULL
#undef PK4
#define PK4_PIN PINK4
#define PK4_RPORT PINK
#define PK4_WPORT PORTK
#define PK4_DDR DDRK
#define PK4_PWM NULL
#undef PK5
#define PK5_PIN PINK5
#define PK5_RPORT PINK
#define PK5_WPORT PORTK
#define PK5_DDR DDRK
#define PK5_PWM NULL
#undef PK6
#define PK6_PIN PINK6
#define PK6_RPORT PINK
#define PK6_WPORT PORTK
#define PK6_DDR DDRK
#define PK6_PWM NULL
#undef PK7
#define PK7_PIN PINK7
#define PK7_RPORT PINK
#define PK7_WPORT PORTK
#define PK7_DDR DDRK
#define PK7_PWM NULL
#undef PL0
#define PL0_PIN PINL0
#define PL0_RPORT PINL
#define PL0_WPORT PORTL
#define PL0_DDR DDRL
#define PL0_PWM NULL
#undef PL1
#define PL1_PIN PINL1
#define PL1_RPORT PINL
#define PL1_WPORT PORTL
#define PL1_DDR DDRL
#define PL1_PWM NULL
#undef PL2
#define PL2_PIN PINL2
#define PL2_RPORT PINL
#define PL2_WPORT PORTL
#define PL2_DDR DDRL
#define PL2_PWM NULL
#undef PL3
#define PL3_PIN PINL3
#define PL3_RPORT PINL
#define PL3_WPORT PORTL
#define PL3_DDR DDRL
#define PL3_PWM &OCR5AL
#undef PL4
#define PL4_PIN PINL4
#define PL4_RPORT PINL
#define PL4_WPORT PORTL
#define PL4_DDR DDRL
#define PL4_PWM &OCR5BL
#undef PL5
#define PL5_PIN PINL5
#define PL5_RPORT PINL
#define PL5_WPORT PORTL
#define PL5_DDR DDRL
#define PL5_PWM &OCR5CL
#undef PL6
#define PL6_PIN PINL6
#define PL6_RPORT PINL
#define PL6_WPORT PORTL
#define PL6_DDR DDRL
#define PL6_PWM NULL
#undef PL7
#define PL7_PIN PINL7
#define PL7_RPORT PINL
#define PL7_WPORT PORTL
#define PL7_DDR DDRL
#define PL7_PWM NULL
#endif // _FASTIO_1280

@ -0,0 +1,720 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Pin mapping for the 1281 and 2561
*
* 1281 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
* 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
* Marlin 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
*/
#ifndef _FASTIO_1281
#define _FASTIO_1281
#include "fastio.h"
// change for your board
#define DEBUG_LED DIO46
// UART
#define RXD DIO0
#define TXD DIO1
// SPI
#define SCK DIO10
#define MISO DIO12
#define MOSI DIO11
#define SS DIO16
// TWI (I2C)
#define SCL DIO17
#define SDA DIO18
// Timers and PWM
#define OC0A DIO9
#define OC0B DIO4
#define OC1A DIO7
#define OC1B DIO8
#define OC2A DIO6
#define OC3A DIO5
#define OC3B DIO2
#define OC3C DIO3
// Digital I/O
#define DIO0_PIN PINE0
#define DIO0_RPORT PINE
#define DIO0_WPORT PORTE
#define DIO0_DDR DDRE
#define DIO0_PWM NULL
#define DIO1_PIN PINE1
#define DIO1_RPORT PINE
#define DIO1_WPORT PORTE
#define DIO1_DDR DDRE
#define DIO1_PWM NULL
#define DIO2_PIN PINE4
#define DIO2_RPORT PINE
#define DIO2_WPORT PORTE
#define DIO2_DDR DDRE
#define DIO2_PWM &OCR3BL
#define DIO3_PIN PINE5
#define DIO3_RPORT PINE
#define DIO3_WPORT PORTE
#define DIO3_DDR DDRE
#define DIO3_PWM &OCR3CL
#define DIO4_PIN PING5
#define DIO4_RPORT PING
#define DIO4_WPORT PORTG
#define DIO4_DDR DDRG
#define DIO4_PWM &OCR0B
#define DIO5_PIN PINE3
#define DIO5_RPORT PINE
#define DIO5_WPORT PORTE
#define DIO5_DDR DDRE
#define DIO5_PWM &OCR3AL
#define DIO6_PIN PINB4
#define DIO6_RPORT PINB
#define DIO6_WPORT PORTB
#define DIO6_DDR DDRB
#define DIO6_PWM &OCR2AL
#define DIO7_PIN PINB5
#define DIO7_RPORT PINB
#define DIO7_WPORT PORTB
#define DIO7_DDR DDRB
#define DIO7_PWM &OCR1AL
#define DIO8_PIN PINB6
#define DIO8_RPORT PINB
#define DIO8_WPORT PORTB
#define DIO8_DDR DDRB
#define DIO8_PWM &OCR1BL
#define DIO9_PIN PINB7
#define DIO9_RPORT PINB
#define DIO9_WPORT PORTB
#define DIO9_DDR DDRB
#define DIO9_PWM &OCR0AL
#define DIO10_PIN PINB1
#define DIO10_RPORT PINB
#define DIO10_WPORT PORTB
#define DIO10_DDR DDRB
#define DIO10_PWM NULL
#define DIO11_PIN PINB2
#define DIO11_RPORT PINB
#define DIO11_WPORT PORTB
#define DIO11_DDR DDRB
#define DIO11_PWM NULL
#define DIO12_PIN PINB3
#define DIO12_RPORT PINB
#define DIO12_WPORT PORTB
#define DIO12_DDR DDRB
#define DIO12_PWM NULL
#define DIO13_PIN PINE2
#define DIO13_RPORT PINE
#define DIO13_WPORT PORTE
#define DIO13_DDR DDRE
#define DIO13_PWM NULL
#define DIO14_PIN PINE6
#define DIO14_RPORT PINE
#define DIO14_WPORT PORTE
#define DIO14_DDR DDRE
#define DIO14_PWM NULL
#define DIO15_PIN PINE7
#define DIO15_RPORT PINE
#define DIO15_WPORT PORTE
#define DIO15_DDR DDRE
#define DIO15_PWM NULL
#define DIO16_PIN PINB0
#define DIO16_RPORT PINB
#define DIO16_WPORT PORTB
#define DIO16_DDR DDRB
#define DIO16_PWM NULL
#define DIO17_PIN PIND0
#define DIO17_RPORT PIND
#define DIO17_WPORT PORTD
#define DIO17_DDR DDRD
#define DIO17_PWM NULL
#define DIO18_PIN PIND1
#define DIO18_RPORT PIND
#define DIO18_WPORT PORTD
#define DIO18_DDR DDRD
#define DIO18_PWM NULL
#define DIO19_PIN PIND2
#define DIO19_RPORT PIND
#define DIO19_WPORT PORTD
#define DIO19_DDR DDRD
#define DIO19_PWM NULL
#define DIO20_PIN PIND3
#define DIO20_RPORT PIND
#define DIO20_WPORT PORTD
#define DIO20_DDR DDRD
#define DIO20_PWM NULL
#define DIO21_PIN PIND4
#define DIO21_RPORT PIND
#define DIO21_WPORT PORTD
#define DIO21_DDR DDRD
#define DIO21_PWM NULL
#define DIO22_PIN PIND5
#define DIO22_RPORT PIND
#define DIO22_WPORT PORTD
#define DIO22_DDR DDRD
#define DIO22_PWM NULL
#define DIO23_PIN PIND6
#define DIO23_RPORT PIND
#define DIO23_WPORT PORTD
#define DIO23_DDR DDRD
#define DIO23_PWM NULL
#define DIO24_PIN PIND7
#define DIO24_RPORT PIND
#define DIO24_WPORT PORTD
#define DIO24_DDR DDRD
#define DIO24_PWM NULL
#define DIO25_PIN PING0
#define DIO25_RPORT PING
#define DIO25_WPORT PORTG
#define DIO25_DDR DDRG
#define DIO25_PWM NULL
#define DIO26_PIN PING1
#define DIO26_RPORT PING
#define DIO26_WPORT PORTG
#define DIO26_DDR DDRG
#define DIO26_PWM NULL
#define DIO27_PIN PING2
#define DIO27_RPORT PING
#define DIO27_WPORT PORTG
#define DIO27_DDR DDRG
#define DIO27_PWM NULL
#define DIO28_PIN PING3
#define DIO28_RPORT PING
#define DIO28_WPORT PORTG
#define DIO28_DDR DDRG
#define DIO28_PWM NULL
#define DIO29_PIN PING4
#define DIO29_RPORT PING
#define DIO29_WPORT PORTG
#define DIO29_DDR DDRG
#define DIO29_PWM NULL
#define DIO30_PIN PINC0
#define DIO30_RPORT PINC
#define DIO30_WPORT PORTC
#define DIO30_DDR DDRC
#define DIO30_PWM NULL
#define DIO31_PIN PINC1
#define DIO31_RPORT PINC
#define DIO31_WPORT PORTC
#define DIO31_DDR DDRC
#define DIO31_PWM NULL
#define DIO32_PIN PINC2
#define DIO32_RPORT PINC
#define DIO32_WPORT PORTC
#define DIO32_DDR DDRC
#define DIO32_PWM NULL
#define DIO33_PIN PINC3
#define DIO33_RPORT PINC
#define DIO33_WPORT PORTC
#define DIO33_DDR DDRC
#define DIO33_PWM NULL
#define DIO34_PIN PINC4
#define DIO34_RPORT PINC
#define DIO34_WPORT PORTC
#define DIO34_DDR DDRC
#define DIO34_PWM NULL
#define DIO35_PIN PINC5
#define DIO35_RPORT PINC
#define DIO35_WPORT PORTC
#define DIO35_DDR DDRC
#define DIO35_PWM NULL
#define DIO36_PIN PINC6
#define DIO36_RPORT PINC
#define DIO36_WPORT PORTC
#define DIO36_DDR DDRC
#define DIO36_PWM NULL
#define DIO37_PIN PINC7
#define DIO37_RPORT PINC
#define DIO37_WPORT PORTC
#define DIO37_DDR DDRC
#define DIO37_PWM NULL
#define DIO38_PIN PINA0
#define DIO38_RPORT PINA
#define DIO38_WPORT PORTA
#define DIO38_DDR DDRA
#define DIO38_PWM NULL
#define DIO39_PIN PINA1
#define DIO39_RPORT PINA
#define DIO39_WPORT PORTA
#define DIO39_DDR DDRA
#define DIO39_PWM NULL
#define DIO40_PIN PINA2
#define DIO40_RPORT PINA
#define DIO40_WPORT PORTA
#define DIO40_DDR DDRA
#define DIO40_PWM NULL
#define DIO41_PIN PINA3
#define DIO41_RPORT PINA
#define DIO41_WPORT PORTA
#define DIO41_DDR DDRA
#define DIO41_PWM NULL
#define DIO42_PIN PINA4
#define DIO42_RPORT PINA
#define DIO42_WPORT PORTA
#define DIO42_DDR DDRA
#define DIO42_PWM NULL
#define DIO43_PIN PINA5
#define DIO43_RPORT PINA
#define DIO43_WPORT PORTA
#define DIO43_DDR DDRA
#define DIO43_PWM NULL
#define DIO44_PIN PINA6
#define DIO44_RPORT PINA
#define DIO44_WPORT PORTA
#define DIO44_DDR DDRA
#define DIO44_PWM NULL
#define DIO45_PIN PINA7
#define DIO45_RPORT PINA
#define DIO45_WPORT PORTA
#define DIO45_DDR DDRA
#define DIO45_PWM NULL
#define DIO46_PIN PINF0
#define DIO46_RPORT PINF
#define DIO46_WPORT PORTF
#define DIO46_DDR DDRF
#define DIO46_PWM NULL
#define DIO47_PIN PINF1
#define DIO47_RPORT PINF
#define DIO47_WPORT PORTF
#define DIO47_DDR DDRF
#define DIO47_PWM NULL
#define DIO48_PIN PINF2
#define DIO48_RPORT PINF
#define DIO48_WPORT PORTF
#define DIO48_DDR DDRF
#define DIO48_PWM NULL
#define DIO49_PIN PINF3
#define DIO49_RPORT PINF
#define DIO49_WPORT PORTF
#define DIO49_DDR DDRF
#define DIO49_PWM NULL
#define DIO50_PIN PINF4
#define DIO50_RPORT PINF
#define DIO50_WPORT PORTF
#define DIO50_DDR DDRF
#define DIO50_PWM NULL
#define DIO51_PIN PINF5
#define DIO51_RPORT PINF
#define DIO51_WPORT PORTF
#define DIO51_DDR DDRF
#define DIO51_PWM NULL
#define DIO52_PIN PINF6
#define DIO52_RPORT PINF
#define DIO52_WPORT PORTF
#define DIO52_DDR DDRF
#define DIO52_PWM NULL
#define DIO53_PIN PINF7
#define DIO53_RPORT PINF
#define DIO53_WPORT PORTF
#define DIO53_DDR DDRF
#define DIO53_PWM NULL
#undef PA0
#define PA0_PIN PINA0
#define PA0_RPORT PINA
#define PA0_WPORT PORTA
#define PA0_DDR DDRA
#define PA0_PWM NULL
#undef PA1
#define PA1_PIN PINA1
#define PA1_RPORT PINA
#define PA1_WPORT PORTA
#define PA1_DDR DDRA
#define PA1_PWM NULL
#undef PA2
#define PA2_PIN PINA2
#define PA2_RPORT PINA
#define PA2_WPORT PORTA
#define PA2_DDR DDRA
#define PA2_PWM NULL
#undef PA3
#define PA3_PIN PINA3
#define PA3_RPORT PINA
#define PA3_WPORT PORTA
#define PA3_DDR DDRA
#define PA3_PWM NULL
#undef PA4
#define PA4_PIN PINA4
#define PA4_RPORT PINA
#define PA4_WPORT PORTA
#define PA4_DDR DDRA
#define PA4_PWM NULL
#undef PA5
#define PA5_PIN PINA5
#define PA5_RPORT PINA
#define PA5_WPORT PORTA
#define PA5_DDR DDRA
#define PA5_PWM NULL
#undef PA6
#define PA6_PIN PINA6
#define PA6_RPORT PINA
#define PA6_WPORT PORTA
#define PA6_DDR DDRA
#define PA6_PWM NULL
#undef PA7
#define PA7_PIN PINA7
#define PA7_RPORT PINA
#define PA7_WPORT PORTA
#define PA7_DDR DDRA
#define PA7_PWM NULL
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_DDR DDRB
#define PB0_PWM NULL
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_DDR DDRB
#define PB1_PWM NULL
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_DDR DDRB
#define PB2_PWM NULL
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_DDR DDRB
#define PB3_PWM NULL
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_DDR DDRB
#define PB4_PWM &OCR2A
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_DDR DDRB
#define PB5_PWM NULL
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_DDR DDRB
#define PB6_PWM NULL
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_DDR DDRB
#define PB7_PWM &OCR0A
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_DDR DDRC
#define PC0_PWM NULL
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_DDR DDRC
#define PC1_PWM NULL
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_DDR DDRC
#define PC2_PWM NULL
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_DDR DDRC
#define PC3_PWM NULL
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_DDR DDRC
#define PC4_PWM NULL
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_DDR DDRC
#define PC5_PWM NULL
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_DDR DDRC
#define PC6_PWM NULL
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_DDR DDRC
#define PC7_PWM NULL
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_DDR DDRD
#define PD0_PWM NULL
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_DDR DDRD
#define PD1_PWM NULL
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_DDR DDRD
#define PD2_PWM NULL
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_DDR DDRD
#define PD3_PWM NULL
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_DDR DDRD
#define PD4_PWM NULL
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_DDR DDRD
#define PD5_PWM NULL
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_DDR DDRD
#define PD6_PWM NULL
#undef PD7
#define PD7_PIN PIND7
#define PD7_RPORT PIND
#define PD7_WPORT PORTD
#define PD7_DDR DDRD
#define PD7_PWM NULL
#undef PE0
#define PE0_PIN PINE0
#define PE0_RPORT PINE
#define PE0_WPORT PORTE
#define PE0_DDR DDRE
#define PE0_PWM NULL
#undef PE1
#define PE1_PIN PINE1
#define PE1_RPORT PINE
#define PE1_WPORT PORTE
#define PE1_DDR DDRE
#define PE1_PWM NULL
#undef PE2
#define PE2_PIN PINE2
#define PE2_RPORT PINE
#define PE2_WPORT PORTE
#define PE2_DDR DDRE
#define PE2_PWM NULL
#undef PE3
#define PE3_PIN PINE3
#define PE3_RPORT PINE
#define PE3_WPORT PORTE
#define PE3_DDR DDRE
#define PE3_PWM &OCR3AL
#undef PE4
#define PE4_PIN PINE4
#define PE4_RPORT PINE
#define PE4_WPORT PORTE
#define PE4_DDR DDRE
#define PE4_PWM &OCR3BL
#undef PE5
#define PE5_PIN PINE5
#define PE5_RPORT PINE
#define PE5_WPORT PORTE
#define PE5_DDR DDRE
#define PE5_PWM &OCR3CL
#undef PE6
#define PE6_PIN PINE6
#define PE6_RPORT PINE
#define PE6_WPORT PORTE
#define PE6_DDR DDRE
#define PE6_PWM NULL
#undef PE7
#define PE7_PIN PINE7
#define PE7_RPORT PINE
#define PE7_WPORT PORTE
#define PE7_DDR DDRE
#define PE7_PWM NULL
#undef PF0
#define PF0_PIN PINF0
#define PF0_RPORT PINF
#define PF0_WPORT PORTF
#define PF0_DDR DDRF
#define PF0_PWM NULL
#undef PF1
#define PF1_PIN PINF1
#define PF1_RPORT PINF
#define PF1_WPORT PORTF
#define PF1_DDR DDRF
#define PF1_PWM NULL
#undef PF2
#define PF2_PIN PINF2
#define PF2_RPORT PINF
#define PF2_WPORT PORTF
#define PF2_DDR DDRF
#define PF2_PWM NULL
#undef PF3
#define PF3_PIN PINF3
#define PF3_RPORT PINF
#define PF3_WPORT PORTF
#define PF3_DDR DDRF
#define PF3_PWM NULL
#undef PF4
#define PF4_PIN PINF4
#define PF4_RPORT PINF
#define PF4_WPORT PORTF
#define PF4_DDR DDRF
#define PF4_PWM NULL
#undef PF5
#define PF5_PIN PINF5
#define PF5_RPORT PINF
#define PF5_WPORT PORTF
#define PF5_DDR DDRF
#define PF5_PWM NULL
#undef PF6
#define PF6_PIN PINF6
#define PF6_RPORT PINF
#define PF6_WPORT PORTF
#define PF6_DDR DDRF
#define PF6_PWM NULL
#undef PF7
#define PF7_PIN PINF7
#define PF7_RPORT PINF
#define PF7_WPORT PORTF
#define PF7_DDR DDRF
#define PF7_PWM NULL
#undef PG0
#define PG0_PIN PING0
#define PG0_RPORT PING
#define PG0_WPORT PORTG
#define PG0_DDR DDRG
#define PG0_PWM NULL
#undef PG1
#define PG1_PIN PING1
#define PG1_RPORT PING
#define PG1_WPORT PORTG
#define PG1_DDR DDRG
#define PG1_PWM NULL
#undef PG2
#define PG2_PIN PING2
#define PG2_RPORT PING
#define PG2_WPORT PORTG
#define PG2_DDR DDRG
#define PG2_PWM NULL
#undef PG3
#define PG3_PIN PING3
#define PG3_RPORT PING
#define PG3_WPORT PORTG
#define PG3_DDR DDRG
#define PG3_PWM NULL
#undef PG4
#define PG4_PIN PING4
#define PG4_RPORT PING
#define PG4_WPORT PORTG
#define PG4_DDR DDRG
#define PG4_PWM NULL
#undef PG5
#define PG5_PIN PING5
#define PG5_RPORT PING
#define PG5_WPORT PORTG
#define PG5_DDR DDRG
#define PG5_PWM &OCR0B
#endif // _FASTIO_1281

@ -0,0 +1,362 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Pin mapping for the 168, 328, and 328P
*
* 168 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
* Port B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
* Marlin 08 09 10 11 12 13 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
*/
#ifndef _FASTIO_168
#define _FASTIO_168
#include "fastio.h"
#define DEBUG_LED AIO5
// UART
#define RXD DIO0
#define TXD DIO1
// SPI
#define SCK DIO13
#define MISO DIO12
#define MOSI DIO11
#define SS DIO10
// TWI (I2C)
#define SCL AIO5
#define SDA AIO4
// Timers and PWM
#define OC0A DIO6
#define OC0B DIO5
#define OC1A DIO9
#define OC1B DIO10
#define OC2A DIO11
#define OC2B DIO3
// Digital I/O
#define DIO0_PIN PIND0
#define DIO0_RPORT PIND
#define DIO0_WPORT PORTD
#define DIO0_DDR DDRD
#define DIO0_PWM NULL
#define DIO1_PIN PIND1
#define DIO1_RPORT PIND
#define DIO1_WPORT PORTD
#define DIO1_DDR DDRD
#define DIO1_PWM NULL
#define DIO2_PIN PIND2
#define DIO2_RPORT PIND
#define DIO2_WPORT PORTD
#define DIO2_DDR DDRD
#define DIO2_PWM NULL
#define DIO3_PIN PIND3
#define DIO3_RPORT PIND
#define DIO3_WPORT PORTD
#define DIO3_DDR DDRD
#define DIO3_PWM &OCR2B
#define DIO4_PIN PIND4
#define DIO4_RPORT PIND
#define DIO4_WPORT PORTD
#define DIO4_DDR DDRD
#define DIO4_PWM NULL
#define DIO5_PIN PIND5
#define DIO5_RPORT PIND
#define DIO5_WPORT PORTD
#define DIO5_DDR DDRD
#define DIO5_PWM &OCR0B
#define DIO6_PIN PIND6
#define DIO6_RPORT PIND
#define DIO6_WPORT PORTD
#define DIO6_DDR DDRD
#define DIO6_PWM &OCR0A
#define DIO7_PIN PIND7
#define DIO7_RPORT PIND
#define DIO7_WPORT PORTD
#define DIO7_DDR DDRD
#define DIO7_PWM NULL
#define DIO8_PIN PINB0
#define DIO8_RPORT PINB
#define DIO8_WPORT PORTB
#define DIO8_DDR DDRB
#define DIO8_PWM NULL
#define DIO9_PIN PINB1
#define DIO9_RPORT PINB
#define DIO9_WPORT PORTB
#define DIO9_DDR DDRB
#define DIO9_PWM NULL
#define DIO10_PIN PINB2
#define DIO10_RPORT PINB
#define DIO10_WPORT PORTB
#define DIO10_DDR DDRB
#define DIO10_PWM NULL
#define DIO11_PIN PINB3
#define DIO11_RPORT PINB
#define DIO11_WPORT PORTB
#define DIO11_DDR DDRB
#define DIO11_PWM &OCR2A
#define DIO12_PIN PINB4
#define DIO12_RPORT PINB
#define DIO12_WPORT PORTB
#define DIO12_DDR DDRB
#define DIO12_PWM NULL
#define DIO13_PIN PINB5
#define DIO13_RPORT PINB
#define DIO13_WPORT PORTB
#define DIO13_DDR DDRB
#define DIO13_PWM NULL
#define DIO14_PIN PINC0
#define DIO14_RPORT PINC
#define DIO14_WPORT PORTC
#define DIO14_DDR DDRC
#define DIO14_PWM NULL
#define DIO15_PIN PINC1
#define DIO15_RPORT PINC
#define DIO15_WPORT PORTC
#define DIO15_DDR DDRC
#define DIO15_PWM NULL
#define DIO16_PIN PINC2
#define DIO16_RPORT PINC
#define DIO16_WPORT PORTC
#define DIO16_DDR DDRC
#define DIO16_PWM NULL
#define DIO17_PIN PINC3
#define DIO17_RPORT PINC
#define DIO17_WPORT PORTC
#define DIO17_DDR DDRC
#define DIO17_PWM NULL
#define DIO18_PIN PINC4
#define DIO18_RPORT PINC
#define DIO18_WPORT PORTC
#define DIO18_DDR DDRC
#define DIO18_PWM NULL
#define DIO19_PIN PINC5
#define DIO19_RPORT PINC
#define DIO19_WPORT PORTC
#define DIO19_DDR DDRC
#define DIO19_PWM NULL
#define DIO20_PIN PINC6
#define DIO20_RPORT PINC
#define DIO20_WPORT PORTC
#define DIO20_DDR DDRC
#define DIO20_PWM NULL
#define DIO21_PIN PINC7
#define DIO21_RPORT PINC
#define DIO21_WPORT PORTC
#define DIO21_DDR DDRC
#define DIO21_PWM NULL
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_DDR DDRB
#define PB0_PWM NULL
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_DDR DDRB
#define PB1_PWM NULL
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_DDR DDRB
#define PB2_PWM NULL
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_DDR DDRB
#define PB3_PWM &OCR2A
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_DDR DDRB
#define PB4_PWM NULL
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_DDR DDRB
#define PB5_PWM NULL
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_DDR DDRB
#define PB6_PWM NULL
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_DDR DDRB
#define PB7_PWM NULL
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_DDR DDRC
#define PC0_PWM NULL
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_DDR DDRC
#define PC1_PWM NULL
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_DDR DDRC
#define PC2_PWM NULL
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_DDR DDRC
#define PC3_PWM NULL
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_DDR DDRC
#define PC4_PWM NULL
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_DDR DDRC
#define PC5_PWM NULL
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_DDR DDRC
#define PC6_PWM NULL
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_DDR DDRC
#define PC7_PWM NULL
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_DDR DDRD
#define PD0_PWM NULL
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_DDR DDRD
#define PD1_PWM NULL
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_DDR DDRD
#define PD2_PWM NULL
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_DDR DDRD
#define PD3_PWM &OCR2B
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_DDR DDRD
#define PD4_PWM NULL
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_DDR DDRD
#define PD5_PWM &OCR0B
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_DDR DDRD
#define PD6_PWM &OCR0A
#undef PD7
#define PD7_PIN PIND7
#define PD7_RPORT PIND
#define PD7_WPORT PORTD
#define PD7_DDR DDRD
#define PD7_PWM NULL
#endif // _FASTIO_168

@ -0,0 +1,531 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Pin mapping for the 644, 644p, 644pa, and 1284p
*
* 644p 31 30 29 28 27 26 25 24 00 01 02 03 04 05 06 07 16 17 18 19 20 21 22 23 08 09 10 11 12 13 14 15
* 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
* Marlin 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
*/
#ifndef _FASTIO_644
#define _FASTIO_644
#include "fastio.h"
#define DEBUG_LED DIO0
// UART
#define RXD DIO8
#define TXD DIO9
#define RXD0 DIO8
#define TXD0 DIO9
#define RXD1 DIO10
#define TXD1 DIO11
// SPI
#define SCK DIO7
#define MISO DIO6
#define MOSI DIO5
#define SS DIO4
// TWI (I2C)
#define SCL DIO16
#define SDA DIO17
// Timers and PWM
#define OC0A DIO3
#define OC0B DIO4
#define OC1A DIO13
#define OC1B DIO12
#define OC2A DIO15
#define OC2B DIO14
// Digital I/O
#define DIO0_PIN PINB0
#define DIO0_RPORT PINB
#define DIO0_WPORT PORTB
#define DIO0_DDR DDRB
#define DIO0_PWM NULL
#define DIO1_PIN PINB1
#define DIO1_RPORT PINB
#define DIO1_WPORT PORTB
#define DIO1_DDR DDRB
#define DIO1_PWM NULL
#define DIO2_PIN PINB2
#define DIO2_RPORT PINB
#define DIO2_WPORT PORTB
#define DIO2_DDR DDRB
#define DIO2_PWM NULL
#define DIO3_PIN PINB3
#define DIO3_RPORT PINB
#define DIO3_WPORT PORTB
#define DIO3_DDR DDRB
#define DIO3_PWM OCR0A
#define DIO4_PIN PINB4
#define DIO4_RPORT PINB
#define DIO4_WPORT PORTB
#define DIO4_DDR DDRB
#define DIO4_PWM OCR0B
#define DIO5_PIN PINB5
#define DIO5_RPORT PINB
#define DIO5_WPORT PORTB
#define DIO5_DDR DDRB
#define DIO5_PWM NULL
#define DIO6_PIN PINB6
#define DIO6_RPORT PINB
#define DIO6_WPORT PORTB
#define DIO6_DDR DDRB
#define DIO6_PWM NULL
#define DIO7_PIN PINB7
#define DIO7_RPORT PINB
#define DIO7_WPORT PORTB
#define DIO7_DDR DDRB
#define DIO7_PWM NULL
#define DIO8_PIN PIND0
#define DIO8_RPORT PIND
#define DIO8_WPORT PORTD
#define DIO8_DDR DDRD
#define DIO8_PWM NULL
#define DIO9_PIN PIND1
#define DIO9_RPORT PIND
#define DIO9_WPORT PORTD
#define DIO9_DDR DDRD
#define DIO9_PWM NULL
#define DIO10_PIN PIND2
#define DIO10_RPORT PIND
#define DIO10_WPORT PORTD
#define DIO10_DDR DDRD
#define DIO10_PWM NULL
#define DIO11_PIN PIND3
#define DIO11_RPORT PIND
#define DIO11_WPORT PORTD
#define DIO11_DDR DDRD
#define DIO11_PWM NULL
#define DIO12_PIN PIND4
#define DIO12_RPORT PIND
#define DIO12_WPORT PORTD
#define DIO12_DDR DDRD
#define DIO12_PWM OCR1B
#define DIO13_PIN PIND5
#define DIO13_RPORT PIND
#define DIO13_WPORT PORTD
#define DIO13_DDR DDRD
#define DIO13_PWM OCR1A
#define DIO14_PIN PIND6
#define DIO14_RPORT PIND
#define DIO14_WPORT PORTD
#define DIO14_DDR DDRD
#define DIO14_PWM OCR2B
#define DIO15_PIN PIND7
#define DIO15_RPORT PIND
#define DIO15_WPORT PORTD
#define DIO15_DDR DDRD
#define DIO15_PWM OCR2A
#define DIO16_PIN PINC0
#define DIO16_RPORT PINC
#define DIO16_WPORT PORTC
#define DIO16_DDR DDRC
#define DIO16_PWM NULL
#define DIO17_PIN PINC1
#define DIO17_RPORT PINC
#define DIO17_WPORT PORTC
#define DIO17_DDR DDRC
#define DIO17_PWM NULL
#define DIO18_PIN PINC2
#define DIO18_RPORT PINC
#define DIO18_WPORT PORTC
#define DIO18_DDR DDRC
#define DIO18_PWM NULL
#define DIO19_PIN PINC3
#define DIO19_RPORT PINC
#define DIO19_WPORT PORTC
#define DIO19_DDR DDRC
#define DIO19_PWM NULL
#define DIO20_PIN PINC4
#define DIO20_RPORT PINC
#define DIO20_WPORT PORTC
#define DIO20_DDR DDRC
#define DIO20_PWM NULL
#define DIO21_PIN PINC5
#define DIO21_RPORT PINC
#define DIO21_WPORT PORTC
#define DIO21_DDR DDRC
#define DIO21_PWM NULL
#define DIO22_PIN PINC6
#define DIO22_RPORT PINC
#define DIO22_WPORT PORTC
#define DIO22_DDR DDRC
#define DIO22_PWM NULL
#define DIO23_PIN PINC7
#define DIO23_RPORT PINC
#define DIO23_WPORT PORTC
#define DIO23_DDR DDRC
#define DIO23_PWM NULL
#define DIO24_PIN PINA7
#define DIO24_RPORT PINA
#define DIO24_WPORT PORTA
#define DIO24_DDR DDRA
#define DIO24_PWM NULL
#define DIO25_PIN PINA6
#define DIO25_RPORT PINA
#define DIO25_WPORT PORTA
#define DIO25_DDR DDRA
#define DIO25_PWM NULL
#define DIO26_PIN PINA5
#define DIO26_RPORT PINA
#define DIO26_WPORT PORTA
#define DIO26_DDR DDRA
#define DIO26_PWM NULL
#define DIO27_PIN PINA4
#define DIO27_RPORT PINA
#define DIO27_WPORT PORTA
#define DIO27_DDR DDRA
#define DIO27_PWM NULL
#define DIO28_PIN PINA3
#define DIO28_RPORT PINA
#define DIO28_WPORT PORTA
#define DIO28_DDR DDRA
#define DIO28_PWM NULL
#define DIO29_PIN PINA2
#define DIO29_RPORT PINA
#define DIO29_WPORT PORTA
#define DIO29_DDR DDRA
#define DIO29_PWM NULL
#define DIO30_PIN PINA1
#define DIO30_RPORT PINA
#define DIO30_WPORT PORTA
#define DIO30_DDR DDRA
#define DIO30_PWM NULL
#define DIO31_PIN PINA0
#define DIO31_RPORT PINA
#define DIO31_WPORT PORTA
#define DIO31_DDR DDRA
#define DIO31_PWM NULL
#define AIO0_PIN PINA0
#define AIO0_RPORT PINA
#define AIO0_WPORT PORTA
#define AIO0_DDR DDRA
#define AIO0_PWM NULL
#define AIO1_PIN PINA1
#define AIO1_RPORT PINA
#define AIO1_WPORT PORTA
#define AIO1_DDR DDRA
#define AIO1_PWM NULL
#define AIO2_PIN PINA2
#define AIO2_RPORT PINA
#define AIO2_WPORT PORTA
#define AIO2_DDR DDRA
#define AIO2_PWM NULL
#define AIO3_PIN PINA3
#define AIO3_RPORT PINA
#define AIO3_WPORT PORTA
#define AIO3_DDR DDRA
#define AIO3_PWM NULL
#define AIO4_PIN PINA4
#define AIO4_RPORT PINA
#define AIO4_WPORT PORTA
#define AIO4_DDR DDRA
#define AIO4_PWM NULL
#define AIO5_PIN PINA5
#define AIO5_RPORT PINA
#define AIO5_WPORT PORTA
#define AIO5_DDR DDRA
#define AIO5_PWM NULL
#define AIO6_PIN PINA6
#define AIO6_RPORT PINA
#define AIO6_WPORT PORTA
#define AIO6_DDR DDRA
#define AIO6_PWM NULL
#define AIO7_PIN PINA7
#define AIO7_RPORT PINA
#define AIO7_WPORT PORTA
#define AIO7_DDR DDRA
#define AIO7_PWM NULL
#undef PA0
#define PA0_PIN PINA0
#define PA0_RPORT PINA
#define PA0_WPORT PORTA
#define PA0_DDR DDRA
#define PA0_PWM NULL
#undef PA1
#define PA1_PIN PINA1
#define PA1_RPORT PINA
#define PA1_WPORT PORTA
#define PA1_DDR DDRA
#define PA1_PWM NULL
#undef PA2
#define PA2_PIN PINA2
#define PA2_RPORT PINA
#define PA2_WPORT PORTA
#define PA2_DDR DDRA
#define PA2_PWM NULL
#undef PA3
#define PA3_PIN PINA3
#define PA3_RPORT PINA
#define PA3_WPORT PORTA
#define PA3_DDR DDRA
#define PA3_PWM NULL
#undef PA4
#define PA4_PIN PINA4
#define PA4_RPORT PINA
#define PA4_WPORT PORTA
#define PA4_DDR DDRA
#define PA4_PWM NULL
#undef PA5
#define PA5_PIN PINA5
#define PA5_RPORT PINA
#define PA5_WPORT PORTA
#define PA5_DDR DDRA
#define PA5_PWM NULL
#undef PA6
#define PA6_PIN PINA6
#define PA6_RPORT PINA
#define PA6_WPORT PORTA
#define PA6_DDR DDRA
#define PA6_PWM NULL
#undef PA7
#define PA7_PIN PINA7
#define PA7_RPORT PINA
#define PA7_WPORT PORTA
#define PA7_DDR DDRA
#define PA7_PWM NULL
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_DDR DDRB
#define PB0_PWM NULL
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_DDR DDRB
#define PB1_PWM NULL
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_DDR DDRB
#define PB2_PWM NULL
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_DDR DDRB
#define PB3_PWM OCR0A
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_DDR DDRB
#define PB4_PWM OCR0B
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_DDR DDRB
#define PB5_PWM NULL
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_DDR DDRB
#define PB6_PWM NULL
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_DDR DDRB
#define PB7_PWM NULL
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_DDR DDRC
#define PC0_PWM NULL
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_DDR DDRC
#define PC1_PWM NULL
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_DDR DDRC
#define PC2_PWM NULL
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_DDR DDRC
#define PC3_PWM NULL
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_DDR DDRC
#define PC4_PWM NULL
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_DDR DDRC
#define PC5_PWM NULL
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_DDR DDRC
#define PC6_PWM NULL
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_DDR DDRC
#define PC7_PWM NULL
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_DDR DDRD
#define PD0_PWM NULL
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_DDR DDRD
#define PD1_PWM NULL
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_DDR DDRD
#define PD2_PWM NULL
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_DDR DDRD
#define PD3_PWM NULL
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_DDR DDRD
#define PD4_PWM NULL
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_DDR DDRD
#define PD5_PWM NULL
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_DDR DDRD
#define PD6_PWM OCR2B
#undef PD7
#define PD7_PIN PIND7
#define PD7_RPORT PIND
#define PD7_WPORT PORTD
#define PD7_DDR DDRD
#define PD7_PWM OCR2A
#endif // _FASTIO_644

@ -0,0 +1,681 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Pin mapping (Marlin) for AT90USB646, 647, 1286, and 1287
*
* AT90USB 51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
* Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
* 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
* > Marlin 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
* The pins 46 and 47 are not supported by Teensyduino, but are supported below.
*/
#ifndef _FASTIO_AT90USB
#define _FASTIO_AT90USB
#include "fastio.h"
// change for your board
#define DEBUG_LED DIO31 /* led D5 red */
// SPI
#define SCK DIO9 // 21
#define MISO DIO11 // 23
#define MOSI DIO10 // 22
#define SS DIO8 // 20
// Digital I/O
#define DIO0_PIN PINA0
#define DIO0_RPORT PINA
#define DIO0_WPORT PORTA
#define DIO0_PWM NULL
#define DIO0_DDR DDRA
#define DIO1_PIN PINA1
#define DIO1_RPORT PINA
#define DIO1_WPORT PORTA
#define DIO1_PWM NULL
#define DIO1_DDR DDRA
#define DIO2_PIN PINA2
#define DIO2_RPORT PINA
#define DIO2_WPORT PORTA
#define DIO2_PWM NULL
#define DIO2_DDR DDRA
#define DIO3_PIN PINA3
#define DIO3_RPORT PINA
#define DIO3_WPORT PORTA
#define DIO3_PWM NULL
#define DIO3_DDR DDRA
#define DIO4_PIN PINA4
#define DIO4_RPORT PINA
#define DIO4_WPORT PORTA
#define DIO4_PWM NULL
#define DIO4_DDR DDRA
#define DIO5_PIN PINA5
#define DIO5_RPORT PINA
#define DIO5_WPORT PORTA
#define DIO5_PWM NULL
#define DIO5_DDR DDRA
#define DIO6_PIN PINA6
#define DIO6_RPORT PINA
#define DIO6_WPORT PORTA
#define DIO6_PWM NULL
#define DIO6_DDR DDRA
#define DIO7_PIN PINA7
#define DIO7_RPORT PINA
#define DIO7_WPORT PORTA
#define DIO7_PWM NULL
#define DIO7_DDR DDRA
#define DIO8_PIN PINB0
#define DIO8_RPORT PINB
#define DIO8_WPORT PORTB
#define DIO8_PWM NULL
#define DIO8_DDR DDRB
#define DIO9_PIN PINB1
#define DIO9_RPORT PINB
#define DIO9_WPORT PORTB
#define DIO9_PWM NULL
#define DIO9_DDR DDRB
#define DIO10_PIN PINB2
#define DIO10_RPORT PINB
#define DIO10_WPORT PORTB
#define DIO10_PWM NULL
#define DIO10_DDR DDRB
#define DIO11_PIN PINB3
#define DIO11_RPORT PINB
#define DIO11_WPORT PORTB
#define DIO11_PWM NULL
#define DIO11_DDR DDRB
#define DIO12_PIN PINB4
#define DIO12_RPORT PINB
#define DIO12_WPORT PORTB
#define DIO12_PWM NULL
#define DIO12_DDR DDRB
#define DIO13_PIN PINB5
#define DIO13_RPORT PINB
#define DIO13_WPORT PORTB
#define DIO13_PWM NULL
#define DIO13_DDR DDRB
#define DIO14_PIN PINB6
#define DIO14_RPORT PINB
#define DIO14_WPORT PORTB
#define DIO14_PWM NULL
#define DIO14_DDR DDRB
#define DIO15_PIN PINB7
#define DIO15_RPORT PINB
#define DIO15_WPORT PORTB
#define DIO15_PWM NULL
#define DIO15_DDR DDRB
#define DIO16_PIN PINC0
#define DIO16_RPORT PINC
#define DIO16_WPORT PORTC
#define DIO16_PWM NULL
#define DIO16_DDR DDRC
#define DIO17_PIN PINC1
#define DIO17_RPORT PINC
#define DIO17_WPORT PORTC
#define DIO17_PWM NULL
#define DIO17_DDR DDRC
#define DIO18_PIN PINC2
#define DIO18_RPORT PINC
#define DIO18_WPORT PORTC
#define DIO18_PWM NULL
#define DIO18_DDR DDRC
#define DIO19_PIN PINC3
#define DIO19_RPORT PINC
#define DIO19_WPORT PORTC
#define DIO19_PWM NULL
#define DIO19_DDR DDRC
#define DIO20_PIN PINC4
#define DIO20_RPORT PINC
#define DIO20_WPORT PORTC
#define DIO20_PWM NULL
#define DIO20_DDR DDRC
#define DIO21_PIN PINC5
#define DIO21_RPORT PINC
#define DIO21_WPORT PORTC
#define DIO21_PWM NULL
#define DIO21_DDR DDRC
#define DIO22_PIN PINC6
#define DIO22_RPORT PINC
#define DIO22_WPORT PORTC
#define DIO22_PWM NULL
#define DIO22_DDR DDRC
#define DIO23_PIN PINC7
#define DIO23_RPORT PINC
#define DIO23_WPORT PORTC
#define DIO23_PWM NULL
#define DIO23_DDR DDRC
#define DIO24_PIN PIND0
#define DIO24_RPORT PIND
#define DIO24_WPORT PORTD
#define DIO24_PWM NULL
#define DIO24_DDR DDRD
#define DIO25_PIN PIND1
#define DIO25_RPORT PIND
#define DIO25_WPORT PORTD
#define DIO25_PWM NULL
#define DIO25_DDR DDRD
#define DIO26_PIN PIND2
#define DIO26_RPORT PIND
#define DIO26_WPORT PORTD
#define DIO26_PWM NULL
#define DIO26_DDR DDRD
#define DIO27_PIN PIND3
#define DIO27_RPORT PIND
#define DIO27_WPORT PORTD
#define DIO27_PWM NULL
#define DIO27_DDR DDRD
#define DIO28_PIN PIND4
#define DIO28_RPORT PIND
#define DIO28_WPORT PORTD
#define DIO28_PWM NULL
#define DIO28_DDR DDRD
#define DIO29_PIN PIND5
#define DIO29_RPORT PIND
#define DIO29_WPORT PORTD
#define DIO29_PWM NULL
#define DIO29_DDR DDRD
#define DIO30_PIN PIND6
#define DIO30_RPORT PIND
#define DIO30_WPORT PORTD
#define DIO30_PWM NULL
#define DIO30_DDR DDRD
#define DIO31_PIN PIND7
#define DIO31_RPORT PIND
#define DIO31_WPORT PORTD
#define DIO31_PWM NULL
#define DIO31_DDR DDRD
#define DIO32_PIN PINE0
#define DIO32_RPORT PINE
#define DIO32_WPORT PORTE
#define DIO32_PWM NULL
#define DIO32_DDR DDRE
#define DIO33_PIN PINE1
#define DIO33_RPORT PINE
#define DIO33_WPORT PORTE
#define DIO33_PWM NULL
#define DIO33_DDR DDRE
#define DIO34_PIN PINE2
#define DIO34_RPORT PINE
#define DIO34_WPORT PORTE
#define DIO34_PWM NULL
#define DIO34_DDR DDRE
#define DIO35_PIN PINE3
#define DIO35_RPORT PINE
#define DIO35_WPORT PORTE
#define DIO35_PWM NULL
#define DIO35_DDR DDRE
#define DIO36_PIN PINE4
#define DIO36_RPORT PINE
#define DIO36_WPORT PORTE
#define DIO36_PWM NULL
#define DIO36_DDR DDRE
#define DIO37_PIN PINE5
#define DIO37_RPORT PINE
#define DIO37_WPORT PORTE
#define DIO37_PWM NULL
#define DIO37_DDR DDRE
#define DIO38_PIN PINE6
#define DIO38_RPORT PINE
#define DIO38_WPORT PORTE
#define DIO38_PWM NULL
#define DIO38_DDR DDRE
#define DIO39_PIN PINE7
#define DIO39_RPORT PINE
#define DIO39_WPORT PORTE
#define DIO39_PWM NULL
#define DIO39_DDR DDRE
#define AIO0_PIN PINF0
#define AIO0_RPORT PINF
#define AIO0_WPORT PORTF
#define AIO0_PWM NULL
#define AIO0_DDR DDRF
#define AIO1_PIN PINF1
#define AIO1_RPORT PINF
#define AIO1_WPORT PORTF
#define AIO1_PWM NULL
#define AIO1_DDR DDRF
#define AIO2_PIN PINF2
#define AIO2_RPORT PINF
#define AIO2_WPORT PORTF
#define AIO2_PWM NULL
#define AIO2_DDR DDRF
#define AIO3_PIN PINF3
#define AIO3_RPORT PINF
#define AIO3_WPORT PORTF
#define AIO3_PWM NULL
#define AIO3_DDR DDRF
#define AIO4_PIN PINF4
#define AIO4_RPORT PINF
#define AIO4_WPORT PORTF
#define AIO4_PWM NULL
#define AIO4_DDR DDRF
#define AIO5_PIN PINF5
#define AIO5_RPORT PINF
#define AIO5_WPORT PORTF
#define AIO5_PWM NULL
#define AIO5_DDR DDRF
#define AIO6_PIN PINF6
#define AIO6_RPORT PINF
#define AIO6_WPORT PORTF
#define AIO6_PWM NULL
#define AIO6_DDR DDRF
#define AIO7_PIN PINF7
#define AIO7_RPORT PINF
#define AIO7_WPORT PORTF
#define AIO7_PWM NULL
#define AIO7_DDR DDRF
#define DIO40_PIN PINF0
#define DIO40_RPORT PINF
#define DIO40_WPORT PORTF
#define DIO40_PWM NULL
#define DIO40_DDR DDRF
#define DIO41_PIN PINF1
#define DIO41_RPORT PINF
#define DIO41_WPORT PORTF
#define DIO41_PWM NULL
#define DIO41_DDR DDRF
#define DIO42_PIN PINF2
#define DIO42_RPORT PINF
#define DIO42_WPORT PORTF
#define DIO42_PWM NULL
#define DIO42_DDR DDRF
#define DIO43_PIN PINF3
#define DIO43_RPORT PINF
#define DIO43_WPORT PORTF
#define DIO43_PWM NULL
#define DIO43_DDR DDRF
#define DIO44_PIN PINF4
#define DIO44_RPORT PINF
#define DIO44_WPORT PORTF
#define DIO44_PWM NULL
#define DIO44_DDR DDRF
#define DIO45_PIN PINF5
#define DIO45_RPORT PINF
#define DIO45_WPORT PORTF
#define DIO45_PWM NULL
#define DIO45_DDR DDRF
#define DIO46_PIN PINF6
#define DIO46_RPORT PINF
#define DIO46_WPORT PORTF
#define DIO46_PWM NULL
#define DIO46_DDR DDRF
#define DIO47_PIN PINF7
#define DIO47_RPORT PINF
#define DIO47_WPORT PORTF
#define DIO47_PWM NULL
#define DIO47_DDR DDRF
// Analog Outputs
#undef PA0
#define PA0_PIN PINA0
#define PA0_RPORT PINA
#define PA0_WPORT PORTA
#define PA0_PWM NULL
#define PA0_DDR DDRA
#undef PA1
#define PA1_PIN PINA1
#define PA1_RPORT PINA
#define PA1_WPORT PORTA
#define PA1_PWM NULL
#define PA1_DDR DDRA
#undef PA2
#define PA2_PIN PINA2
#define PA2_RPORT PINA
#define PA2_WPORT PORTA
#define PA2_PWM NULL
#define PA2_DDR DDRA
#undef PA3
#define PA3_PIN PINA3
#define PA3_RPORT PINA
#define PA3_WPORT PORTA
#define PA3_PWM NULL
#define PA3_DDR DDRA
#undef PA4
#define PA4_PIN PINA4
#define PA4_RPORT PINA
#define PA4_WPORT PORTA
#define PA4_PWM NULL
#define PA4_DDR DDRA
#undef PA5
#define PA5_PIN PINA5
#define PA5_RPORT PINA
#define PA5_WPORT PORTA
#define PA5_PWM NULL
#define PA5_DDR DDRA
#undef PA6
#define PA6_PIN PINA6
#define PA6_RPORT PINA
#define PA6_WPORT PORTA
#define PA6_PWM NULL
#define PA6_DDR DDRA
#undef PA7
#define PA7_PIN PINA7
#define PA7_RPORT PINA
#define PA7_WPORT PORTA
#define PA7_PWM NULL
#define PA7_DDR DDRA
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_PWM NULL
#define PB0_DDR DDRB
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_PWM NULL
#define PB1_DDR DDRB
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_PWM NULL
#define PB2_DDR DDRB
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_PWM NULL
#define PB3_DDR DDRB
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_PWM NULL
#define PB4_DDR DDRB
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_PWM NULL
#define PB5_DDR DDRB
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_PWM NULL
#define PB6_DDR DDRB
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_PWM NULL
#define PB7_DDR DDRB
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_PWM NULL
#define PC0_DDR DDRC
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_PWM NULL
#define PC1_DDR DDRC
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_PWM NULL
#define PC2_DDR DDRC
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_PWM NULL
#define PC3_DDR DDRC
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_PWM NULL
#define PC4_DDR DDRC
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_PWM NULL
#define PC5_DDR DDRC
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_PWM NULL
#define PC6_DDR DDRC
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_PWM NULL
#define PC7_DDR DDRC
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_PWM NULL
#define PD0_DDR DDRD
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_PWM NULL
#define PD1_DDR DDRD
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_PWM NULL
#define PD2_DDR DDRD
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_PWM NULL
#define PD3_DDR DDRD
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_PWM NULL
#define PD4_DDR DDRD
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_PWM NULL
#define PD5_DDR DDRD
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_PWM NULL
#define PD6_DDR DDRD
#undef PD7
#define PD7_PIN PIND7
#define PD7_RPORT PIND
#define PD7_WPORT PORTD
#define PD7_PWM NULL
#define PD7_DDR DDRD
#undef PE0
#define PE0_PIN PINE0
#define PE0_RPORT PINE
#define PE0_WPORT PORTE
#define PE0_PWM NULL
#define PE0_DDR DDRE
#undef PE1
#define PE1_PIN PINE1
#define PE1_RPORT PINE
#define PE1_WPORT PORTE
#define PE1_PWM NULL
#define PE1_DDR DDRE
#undef PE2
#define PE2_PIN PINE2
#define PE2_RPORT PINE
#define PE2_WPORT PORTE
#define PE2_PWM NULL
#define PE2_DDR DDRE
#undef PE3
#define PE3_PIN PINE3
#define PE3_RPORT PINE
#define PE3_WPORT PORTE
#define PE3_PWM NULL
#define PE3_DDR DDRE
#undef PE4
#define PE4_PIN PINE4
#define PE4_RPORT PINE
#define PE4_WPORT PORTE
#define PE4_PWM NULL
#define PE4_DDR DDRE
#undef PE5
#define PE5_PIN PINE5
#define PE5_RPORT PINE
#define PE5_WPORT PORTE
#define PE5_PWM NULL
#define PE5_DDR DDRE
#undef PE6
#define PE6_PIN PINE6
#define PE6_RPORT PINE
#define PE6_WPORT PORTE
#define PE6_PWM NULL
#define PE6_DDR DDRE
#undef PE7
#define PE7_PIN PINE7
#define PE7_RPORT PINE
#define PE7_WPORT PORTE
#define PE7_PWM NULL
#define PE7_DDR DDRE
#undef PF0
#define PF0_PIN PINF0
#define PF0_RPORT PINF
#define PF0_WPORT PORTF
#define PF0_PWM NULL
#define PF0_DDR DDRF
#undef PF1
#define PF1_PIN PINF1
#define PF1_RPORT PINF
#define PF1_WPORT PORTF
#define PF1_PWM NULL
#define PF1_DDR DDRF
#undef PF2
#define PF2_PIN PINF2
#define PF2_RPORT PINF
#define PF2_WPORT PORTF
#define PF2_PWM NULL
#define PF2_DDR DDRF
#undef PF3
#define PF3_PIN PINF3
#define PF3_RPORT PINF
#define PF3_WPORT PORTF
#define PF3_PWM NULL
#define PF3_DDR DDRF
#undef PF4
#define PF4_PIN PINF4
#define PF4_RPORT PINF
#define PF4_WPORT PORTF
#define PF4_PWM NULL
#define PF4_DDR DDRF
#undef PF5
#define PF5_PIN PINF5
#define PF5_RPORT PINF
#define PF5_WPORT PORTF
#define PF5_PWM NULL
#define PF5_DDR DDRF
#undef PF6
#define PF6_PIN PINF6
#define PF6_RPORT PINF
#define PF6_WPORT PORTF
#define PF6_PWM NULL
#define PF6_DDR DDRF
#undef PF7
#define PF7_PIN PINF7
#define PF7_RPORT PINF
#define PF7_WPORT PORTF
#define PF7_PWM NULL
#define PF7_DDR DDRF
#endif // _FASTIO_AT90USB

@ -0,0 +1,682 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Pin mapping (Teensy) for AT90USB646, 647, 1286, and 1287
*
* AT90USB 51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
* > Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
* 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
* Marlin 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
* The pins 46 and 47 are not supported by Teensyduino, but are supported below.
*/
#ifndef _FASTIO_AT90USB
#define _FASTIO_AT90USB
#include "fastio.h"
// change for your board
#define DEBUG_LED DIO31 /* led D5 red */
// SPI
#define SCK DIO21 // 9
#define MISO DIO23 // 11
#define MOSI DIO22 // 10
#define SS DIO20 // 8
// Digital I/O
#define DIO0_PIN PIND0
#define DIO0_RPORT PIND
#define DIO0_WPORT PORTD
#define DIO0_PWM NULL
#define DIO0_DDR DDRD
#define DIO1_PIN PIND1
#define DIO1_RPORT PIND
#define DIO1_WPORT PORTD
#define DIO1_PWM NULL
#define DIO1_DDR DDRD
#define DIO2_PIN PIND2
#define DIO2_RPORT PIND
#define DIO2_WPORT PORTD
#define DIO2_PWM NULL
#define DIO2_DDR DDRD
#define DIO3_PIN PIND3
#define DIO3_RPORT PIND
#define DIO3_WPORT PORTD
#define DIO3_PWM NULL
#define DIO3_DDR DDRD
#define DIO4_PIN PIND4
#define DIO4_RPORT PIND
#define DIO4_WPORT PORTD
#define DIO4_PWM NULL
#define DIO4_DDR DDRD
#define DIO5_PIN PIND5
#define DIO5_RPORT PIND
#define DIO5_WPORT PORTD
#define DIO5_PWM NULL
#define DIO5_DDR DDRD
#define DIO6_PIN PIND6
#define DIO6_RPORT PIND
#define DIO6_WPORT PORTD
#define DIO6_PWM NULL
#define DIO6_DDR DDRD
#define DIO7_PIN PIND7
#define DIO7_RPORT PIND
#define DIO7_WPORT PORTD
#define DIO7_PWM NULL
#define DIO7_DDR DDRD
#define DIO8_PIN PINE0
#define DIO8_RPORT PINE
#define DIO8_WPORT PORTE
#define DIO8_PWM NULL
#define DIO8_DDR DDRE
#define DIO9_PIN PINE1
#define DIO9_RPORT PINE
#define DIO9_WPORT PORTE
#define DIO9_PWM NULL
#define DIO9_DDR DDRE
#define DIO10_PIN PINC0
#define DIO10_RPORT PINC
#define DIO10_WPORT PORTC
#define DIO10_PWM NULL
#define DIO10_DDR DDRC
#define DIO11_PIN PINC1
#define DIO11_RPORT PINC
#define DIO11_WPORT PORTC
#define DIO11_PWM NULL
#define DIO11_DDR DDRC
#define DIO12_PIN PINC2
#define DIO12_RPORT PINC
#define DIO12_WPORT PORTC
#define DIO12_PWM NULL
#define DIO12_DDR DDRC
#define DIO13_PIN PINC3
#define DIO13_RPORT PINC
#define DIO13_WPORT PORTC
#define DIO13_PWM NULL
#define DIO13_DDR DDRC
#define DIO14_PIN PINC4
#define DIO14_RPORT PINC
#define DIO14_WPORT PORTC
#define DIO14_PWM NULL
#define DIO14_DDR DDRC
#define DIO15_PIN PINC5
#define DIO15_RPORT PINC
#define DIO15_WPORT PORTC
#define DIO15_PWM NULL
#define DIO15_DDR DDRC
#define DIO16_PIN PINC6
#define DIO16_RPORT PINC
#define DIO16_WPORT PORTC
#define DIO16_PWM NULL
#define DIO16_DDR DDRC
#define DIO17_PIN PINC7
#define DIO17_RPORT PINC
#define DIO17_WPORT PORTC
#define DIO17_PWM NULL
#define DIO17_DDR DDRC
#define DIO18_PIN PINE6
#define DIO18_RPORT PINE
#define DIO18_WPORT PORTE
#define DIO18_PWM NULL
#define DIO18_DDR DDRE
#define DIO19_PIN PINE7
#define DIO19_RPORT PINE
#define DIO19_WPORT PORTE
#define DIO19_PWM NULL
#define DIO19_DDR DDRE
#define DIO20_PIN PINB0
#define DIO20_RPORT PINB
#define DIO20_WPORT PORTB
#define DIO20_PWM NULL
#define DIO20_DDR DDRB
#define DIO21_PIN PINB1
#define DIO21_RPORT PINB
#define DIO21_WPORT PORTB
#define DIO21_PWM NULL
#define DIO21_DDR DDRB
#define DIO22_PIN PINB2
#define DIO22_RPORT PINB
#define DIO22_WPORT PORTB
#define DIO22_PWM NULL
#define DIO22_DDR DDRB
#define DIO23_PIN PINB3
#define DIO23_RPORT PINB
#define DIO23_WPORT PORTB
#define DIO23_PWM NULL
#define DIO23_DDR DDRB
#define DIO24_PIN PINB4
#define DIO24_RPORT PINB
#define DIO24_WPORT PORTB
#define DIO24_PWM NULL
#define DIO24_DDR DDRB
#define DIO25_PIN PINB5
#define DIO25_RPORT PINB
#define DIO25_WPORT PORTB
#define DIO25_PWM NULL
#define DIO25_DDR DDRB
#define DIO26_PIN PINB6
#define DIO26_RPORT PINB
#define DIO26_WPORT PORTB
#define DIO26_PWM NULL
#define DIO26_DDR DDRB
#define DIO27_PIN PINB7
#define DIO27_RPORT PINB
#define DIO27_WPORT PORTB
#define DIO27_PWM NULL
#define DIO27_DDR DDRB
#define DIO28_PIN PINA0
#define DIO28_RPORT PINA
#define DIO28_WPORT PORTA
#define DIO28_PWM NULL
#define DIO28_DDR DDRA
#define DIO29_PIN PINA1
#define DIO29_RPORT PINA
#define DIO29_WPORT PORTA
#define DIO29_PWM NULL
#define DIO29_DDR DDRA
#define DIO30_PIN PINA2
#define DIO30_RPORT PINA
#define DIO30_WPORT PORTA
#define DIO30_PWM NULL
#define DIO30_DDR DDRA
#define DIO31_PIN PINA3
#define DIO31_RPORT PINA
#define DIO31_WPORT PORTA
#define DIO31_PWM NULL
#define DIO31_DDR DDRA
#define DIO32_PIN PINA4
#define DIO32_RPORT PINA
#define DIO32_WPORT PORTA
#define DIO32_PWM NULL
#define DIO32_DDR DDRA
#define DIO33_PIN PINA5
#define DIO33_RPORT PINA
#define DIO33_WPORT PORTA
#define DIO33_PWM NULL
#define DIO33_DDR DDRA
#define DIO34_PIN PINA6
#define DIO34_RPORT PINA
#define DIO34_WPORT PORTA
#define DIO34_PWM NULL
#define DIO34_DDR DDRA
#define DIO35_PIN PINA7
#define DIO35_RPORT PINA
#define DIO35_WPORT PORTA
#define DIO35_PWM NULL
#define DIO35_DDR DDRA
#define DIO36_PIN PINE4
#define DIO36_RPORT PINE
#define DIO36_WPORT PORTE
#define DIO36_PWM NULL
#define DIO36_DDR DDRE
#define DIO37_PIN PINE5
#define DIO37_RPORT PINE
#define DIO37_WPORT PORTE
#define DIO37_PWM NULL
#define DIO37_DDR DDRE
#define DIO38_PIN PINF0
#define DIO38_RPORT PINF
#define DIO38_WPORT PORTF
#define DIO38_PWM NULL
#define DIO38_DDR DDRF
#define DIO39_PIN PINF1
#define DIO39_RPORT PINF
#define DIO39_WPORT PORTF
#define DIO39_PWM NULL
#define DIO39_DDR DDRF
#define DIO40_PIN PINF2
#define DIO40_RPORT PINF
#define DIO40_WPORT PORTF
#define DIO40_PWM NULL
#define DIO40_DDR DDRF
#define DIO41_PIN PINF3
#define DIO41_RPORT PINF
#define DIO41_WPORT PORTF
#define DIO41_PWM NULL
#define DIO41_DDR DDRF
#define DIO42_PIN PINF4
#define DIO42_RPORT PINF
#define DIO42_WPORT PORTF
#define DIO42_PWM NULL
#define DIO42_DDR DDRF
#define DIO43_PIN PINF5
#define DIO43_RPORT PINF
#define DIO43_WPORT PORTF
#define DIO43_PWM NULL
#define DIO43_DDR DDRF
#define DIO44_PIN PINF6
#define DIO44_RPORT PINF
#define DIO44_WPORT PORTF
#define DIO44_PWM NULL
#define DIO44_DDR DDRF
#define DIO45_PIN PINF7
#define DIO45_RPORT PINF
#define DIO45_WPORT PORTF
#define DIO45_PWM NULL
#define DIO45_DDR DDRF
#define AIO0_PIN PINF0
#define AIO0_RPORT PINF
#define AIO0_WPORT PORTF
#define AIO0_PWM NULL
#define AIO0_DDR DDRF
#define AIO1_PIN PINF1
#define AIO1_RPORT PINF
#define AIO1_WPORT PORTF
#define AIO1_PWM NULL
#define AIO1_DDR DDRF
#define AIO2_PIN PINF2
#define AIO2_RPORT PINF
#define AIO2_WPORT PORTF
#define AIO2_PWM NULL
#define AIO2_DDR DDRF
#define AIO3_PIN PINF3
#define AIO3_RPORT PINF
#define AIO3_WPORT PORTF
#define AIO3_PWM NULL
#define AIO3_DDR DDRF
#define AIO4_PIN PINF4
#define AIO4_RPORT PINF
#define AIO4_WPORT PORTF
#define AIO4_PWM NULL
#define AIO4_DDR DDRF
#define AIO5_PIN PINF5
#define AIO5_RPORT PINF
#define AIO5_WPORT PORTF
#define AIO5_PWM NULL
#define AIO5_DDR DDRF
#define AIO6_PIN PINF6
#define AIO6_RPORT PINF
#define AIO6_WPORT PORTF
#define AIO6_PWM NULL
#define AIO6_DDR DDRF
#define AIO7_PIN PINF7
#define AIO7_RPORT PINF
#define AIO7_WPORT PORTF
#define AIO7_PWM NULL
#define AIO7_DDR DDRF
//-- Begin not supported by Teensyduino
//-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
#define DIO46_PIN PINE2
#define DIO46_RPORT PINE
#define DIO46_WPORT PORTE
#define DIO46_PWM NULL
#define DIO46_DDR DDRE
#define DIO47_PIN PINE3
#define DIO47_RPORT PINE
#define DIO47_WPORT PORTE
#define DIO47_PWM NULL
#define DIO47_DDR DDRE
//-- end not supported by Teensyduino
#undef PA0
#define PA0_PIN PINA0
#define PA0_RPORT PINA
#define PA0_WPORT PORTA
#define PA0_PWM NULL
#define PA0_DDR DDRA
#undef PA1
#define PA1_PIN PINA1
#define PA1_RPORT PINA
#define PA1_WPORT PORTA
#define PA1_PWM NULL
#define PA1_DDR DDRA
#undef PA2
#define PA2_PIN PINA2
#define PA2_RPORT PINA
#define PA2_WPORT PORTA
#define PA2_PWM NULL
#define PA2_DDR DDRA
#undef PA3
#define PA3_PIN PINA3
#define PA3_RPORT PINA
#define PA3_WPORT PORTA
#define PA3_PWM NULL
#define PA3_DDR DDRA
#undef PA4
#define PA4_PIN PINA4
#define PA4_RPORT PINA
#define PA4_WPORT PORTA
#define PA4_PWM NULL
#define PA4_DDR DDRA
#undef PA5
#define PA5_PIN PINA5
#define PA5_RPORT PINA
#define PA5_WPORT PORTA
#define PA5_PWM NULL
#define PA5_DDR DDRA
#undef PA6
#define PA6_PIN PINA6
#define PA6_RPORT PINA
#define PA6_WPORT PORTA
#define PA6_PWM NULL
#define PA6_DDR DDRA
#undef PA7
#define PA7_PIN PINA7
#define PA7_RPORT PINA
#define PA7_WPORT PORTA
#define PA7_PWM NULL
#define PA7_DDR DDRA
#undef PB0
#define PB0_PIN PINB0
#define PB0_RPORT PINB
#define PB0_WPORT PORTB
#define PB0_PWM NULL
#define PB0_DDR DDRB
#undef PB1
#define PB1_PIN PINB1
#define PB1_RPORT PINB
#define PB1_WPORT PORTB
#define PB1_PWM NULL
#define PB1_DDR DDRB
#undef PB2
#define PB2_PIN PINB2
#define PB2_RPORT PINB
#define PB2_WPORT PORTB
#define PB2_PWM NULL
#define PB2_DDR DDRB
#undef PB3
#define PB3_PIN PINB3
#define PB3_RPORT PINB
#define PB3_WPORT PORTB
#define PB3_PWM NULL
#define PB3_DDR DDRB
#undef PB4
#define PB4_PIN PINB4
#define PB4_RPORT PINB
#define PB4_WPORT PORTB
#define PB4_PWM NULL
#define PB4_DDR DDRB
#undef PB5
#define PB5_PIN PINB5
#define PB5_RPORT PINB
#define PB5_WPORT PORTB
#define PB5_PWM NULL
#define PB5_DDR DDRB
#undef PB6
#define PB6_PIN PINB6
#define PB6_RPORT PINB
#define PB6_WPORT PORTB
#define PB6_PWM NULL
#define PB6_DDR DDRB
#undef PB7
#define PB7_PIN PINB7
#define PB7_RPORT PINB
#define PB7_WPORT PORTB
#define PB7_PWM NULL
#define PB7_DDR DDRB
#undef PC0
#define PC0_PIN PINC0
#define PC0_RPORT PINC
#define PC0_WPORT PORTC
#define PC0_PWM NULL
#define PC0_DDR DDRC
#undef PC1
#define PC1_PIN PINC1
#define PC1_RPORT PINC
#define PC1_WPORT PORTC
#define PC1_PWM NULL
#define PC1_DDR DDRC
#undef PC2
#define PC2_PIN PINC2
#define PC2_RPORT PINC
#define PC2_WPORT PORTC
#define PC2_PWM NULL
#define PC2_DDR DDRC
#undef PC3
#define PC3_PIN PINC3
#define PC3_RPORT PINC
#define PC3_WPORT PORTC
#define PC3_PWM NULL
#define PC3_DDR DDRC
#undef PC4
#define PC4_PIN PINC4
#define PC4_RPORT PINC
#define PC4_WPORT PORTC
#define PC4_PWM NULL
#define PC4_DDR DDRC
#undef PC5
#define PC5_PIN PINC5
#define PC5_RPORT PINC
#define PC5_WPORT PORTC
#define PC5_PWM NULL
#define PC5_DDR DDRC
#undef PC6
#define PC6_PIN PINC6
#define PC6_RPORT PINC
#define PC6_WPORT PORTC
#define PC6_PWM NULL
#define PC6_DDR DDRC
#undef PC7
#define PC7_PIN PINC7
#define PC7_RPORT PINC
#define PC7_WPORT PORTC
#define PC7_PWM NULL
#define PC7_DDR DDRC
#undef PD0
#define PD0_PIN PIND0
#define PD0_RPORT PIND
#define PD0_WPORT PORTD
#define PD0_PWM NULL
#define PD0_DDR DDRD
#undef PD1
#define PD1_PIN PIND1
#define PD1_RPORT PIND
#define PD1_WPORT PORTD
#define PD1_PWM NULL
#define PD1_DDR DDRD
#undef PD2
#define PD2_PIN PIND2
#define PD2_RPORT PIND
#define PD2_WPORT PORTD
#define PD2_PWM NULL
#define PD2_DDR DDRD
#undef PD3
#define PD3_PIN PIND3
#define PD3_RPORT PIND
#define PD3_WPORT PORTD
#define PD3_PWM NULL
#define PD3_DDR DDRD
#undef PD4
#define PD4_PIN PIND4
#define PD4_RPORT PIND
#define PD4_WPORT PORTD
#define PD4_PWM NULL
#define PD4_DDR DDRD
#undef PD5
#define PD5_PIN PIND5
#define PD5_RPORT PIND
#define PD5_WPORT PORTD
#define PD5_PWM NULL
#define PD5_DDR DDRD
#undef PD6
#define PD6_PIN PIND6
#define PD6_RPORT PIND
#define PD6_WPORT PORTD
#define PD6_PWM NULL
#define PD6_DDR DDRD
#undef PD7
#define PD7_PIN PIND7
#define PD7_RPORT PIND
#define PD7_WPORT PORTD
#define PD7_PWM NULL
#define PD7_DDR DDRD
#undef PE0
#define PE0_PIN PINE0
#define PE0_RPORT PINE
#define PE0_WPORT PORTE
#define PE0_PWM NULL
#define PE0_DDR DDRE
#undef PE1
#define PE1_PIN PINE1
#define PE1_RPORT PINE
#define PE1_WPORT PORTE
#define PE1_PWM NULL
#define PE1_DDR DDRE
#undef PE2
#define PE2_PIN PINE2
#define PE2_RPORT PINE
#define PE2_WPORT PORTE
#define PE2_PWM NULL
#define PE2_DDR DDRE
#undef PE3
#define PE3_PIN PINE3
#define PE3_RPORT PINE
#define PE3_WPORT PORTE
#define PE3_PWM NULL
#define PE3_DDR DDRE
#undef PE4
#define PE4_PIN PINE4
#define PE4_RPORT PINE
#define PE4_WPORT PORTE
#define PE4_PWM NULL
#define PE4_DDR DDRE
#undef PE5
#define PE5_PIN PINE5
#define PE5_RPORT PINE
#define PE5_WPORT PORTE
#define PE5_PWM NULL
#define PE5_DDR DDRE
#undef PE6
#define PE6_PIN PINE6
#define PE6_RPORT PINE
#define PE6_WPORT PORTE
#define PE6_PWM NULL
#define PE6_DDR DDRE
#undef PE7
#define PE7_PIN PINE7
#define PE7_RPORT PINE
#define PE7_WPORT PORTE
#define PE7_PWM NULL
#define PE7_DDR DDRE
#undef PF0
#define PF0_PIN PINF0
#define PF0_RPORT PINF
#define PF0_WPORT PORTF
#define PF0_PWM NULL
#define PF0_DDR DDRF
#undef PF1
#define PF1_PIN PINF1
#define PF1_RPORT PINF
#define PF1_WPORT PORTF
#define PF1_PWM NULL
#define PF1_DDR DDRF
#undef PF2
#define PF2_PIN PINF2
#define PF2_RPORT PINF
#define PF2_WPORT PORTF
#define PF2_PWM NULL
#define PF2_DDR DDRF
#undef PF3
#define PF3_PIN PINF3
#define PF3_RPORT PINF
#define PF3_WPORT PORTF
#define PF3_PWM NULL
#define PF3_DDR DDRF
#undef PF4
#define PF4_PIN PINF4
#define PF4_RPORT PINF
#define PF4_WPORT PORTF
#define PF4_PWM NULL
#define PF4_DDR DDRF
#undef PF5
#define PF5_PIN PINF5
#define PF5_RPORT PINF
#define PF5_WPORT PORTF
#define PF5_PWM NULL
#define PF5_DDR DDRF
#undef PF6
#define PF6_PIN PINF6
#define PF6_RPORT PINF
#define PF6_WPORT PORTF
#define PF6_PWM NULL
#define PF6_DDR DDRF
#undef PF7
#define PF7_PIN PINF7
#define PF7_RPORT PINF
#define PF7_WPORT PORTF
#define PF7_PWM NULL
#define PF7_DDR DDRF
#endif // _FASTIO_AT90USB

@ -0,0 +1,279 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* gcode.cpp - Parser for a GCode line, providing a parameter interface.
*/
#include "gcode.h"
#include "Marlin.h"
#include "language.h"
// Must be declared for allocation and to satisfy the linker
// Zero values need no initialization.
#if ENABLED(INCH_MODE_SUPPORT)
float GCodeParser::linear_unit_factor, GCodeParser::volumetric_unit_factor;
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
TempUnit GCodeParser::input_temp_units;
#endif
char *GCodeParser::command_ptr,
*GCodeParser::string_arg,
*GCodeParser::value_ptr;
char GCodeParser::command_letter;
int GCodeParser::codenum;
#if USE_GCODE_SUBCODES
int GCodeParser::subcode;
#endif
#if ENABLED(FASTER_GCODE_PARSER)
// Optimized Parameters
byte GCodeParser::codebits[4]; // found bits
uint8_t GCodeParser::param[26]; // parameter offsets from command_ptr
#else
char *GCodeParser::command_args; // start of parameters
#endif
// Create a global instance of the GCode parser singleton
GCodeParser parser;
/**
* Clear all code-seen (and value pointers)
*
* Since each param is set/cleared on seen codes,
* this may be optimized by commenting out ZERO(param)
*/
void GCodeParser::reset() {
string_arg = NULL; // No whole line argument
command_letter = '?'; // No command letter
codenum = 0; // No command code
#if USE_GCODE_SUBCODES
subcode = 0; // No command sub-code
#endif
#if ENABLED(FASTER_GCODE_PARSER)
ZERO(codebits); // No codes yet
//ZERO(param); // No parameters (should be safe to comment out this line)
#endif
}
// Populate all fields by parsing a single line of GCode
// 58 bytes of SRAM are used to speed up seen/value
void GCodeParser::parse(char *p) {
reset(); // No codes to report
// Skip spaces
while (*p == ' ') ++p;
// Skip N[-0-9] if included in the command line
if (*p == 'N' && NUMERIC_SIGNED(p[1])) {
#if ENABLED(FASTER_GCODE_PARSER)
//set('N', p + 1); // (optional) Set the 'N' parameter value
#endif
p += 2; // skip N[-0-9]
while (NUMERIC(*p)) ++p; // skip [0-9]*
while (*p == ' ') ++p; // skip [ ]*
}
// *p now points to the current command, which should be G, M, or T
command_ptr = p;
// Get the command letter, which must be G, M, or T
const char letter = *p++;
// Nullify asterisk and trailing whitespace
char *starpos = strchr(p, '*');
if (starpos) {
--starpos; // *
while (*starpos == ' ') --starpos; // spaces...
starpos[1] = '\0';
}
// Bail if the letter is not G, M, or T
switch (letter) { case 'G': case 'M': case 'T': break; default: return; }
// Skip spaces to get the numeric part
while (*p == ' ') p++;
// Bail if there's no command code number
if (!NUMERIC(*p)) return;
// Save the command letter at this point
// A '?' signifies an unknown command
command_letter = letter;
// Get the code number - integer digits only
codenum = 0;
do {
codenum *= 10, codenum += *p++ - '0';
} while (NUMERIC(*p));
// Allow for decimal point in command
#if USE_GCODE_SUBCODES
if (*p == '.') {
p++;
while (NUMERIC(*p))
subcode *= 10, subcode += *p++ - '0';
}
#endif
// Skip all spaces to get to the first argument, or nul
while (*p == ' ') p++;
// The command parameters (if any) start here, for sure!
#if DISABLED(FASTER_GCODE_PARSER)
command_args = p; // Scan for parameters in seen()
#endif
// Only use string_arg for these M codes
if (letter == 'M') switch (codenum) { case 23: case 28: case 30: case 117: case 928: string_arg = p; return; default: break; }
#if ENABLED(DEBUG_GCODE_PARSER)
const bool debug = codenum == 800;
#endif
/**
* Find all parameters, set flags and pointers for fast parsing
*
* Most codes ignore 'string_arg', but those that want a string will get the right pointer.
* The following loop assigns the first "parameter" having no numeric value to 'string_arg'.
* This allows M0/M1 with expire time to work: "M0 S5 You Win!"
*/
string_arg = NULL;
while (char code = *p++) { // Get the next parameter. A NUL ends the loop
// Special handling for M32 [P] !/path/to/file.g#
// The path must be the last parameter
if (code == '!' && letter == 'M' && codenum == 32) {
string_arg = p; // Name starts after '!'
char * const lb = strchr(p, '#'); // Already seen '#' as SD char (to pause buffering)
if (lb) *lb = '\0'; // Safe to mark the end of the filename
return;
}
// Arguments MUST be uppercase for fast GCode parsing
#if ENABLED(FASTER_GCODE_PARSER)
#define PARAM_TEST WITHIN(code, 'A', 'Z')
#else
#define PARAM_TEST true
#endif
if (PARAM_TEST) {
const bool has_num = DECIMAL_SIGNED(*p); // The parameter has a number [-+0-9.]
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) {
SERIAL_ECHOPAIR("Got letter ", code); // DEBUG
SERIAL_ECHOPAIR(" at index ", (int)(p - command_ptr - 1)); // DEBUG
if (has_num) SERIAL_ECHOPGM(" (has_num)");
}
#endif
if (!has_num && !string_arg) { // No value? First time, keep as string_arg
string_arg = p - 1;
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
#endif
}
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) SERIAL_EOL;
#endif
#if ENABLED(FASTER_GCODE_PARSER)
set(code, has_num ? p : NULL // Set parameter exists and pointer (NULL for no number)
#if ENABLED(DEBUG_GCODE_PARSER)
, debug
#endif
);
#endif
}
else if (!string_arg) { // Not A-Z? First time, keep as the string_arg
string_arg = p - 1;
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
#endif
}
while (*p && *p != ' ') p++; // Skip over the parameter
while (*p == ' ') p++; // Skip over all spaces
}
}
void GCodeParser::unknown_command_error() {
SERIAL_ECHO_START;
SERIAL_ECHOPAIR(MSG_UNKNOWN_COMMAND, command_ptr);
SERIAL_CHAR('"');
SERIAL_EOL;
}
#if ENABLED(DEBUG_GCODE_PARSER)
void GCodeParser::debug() {
SERIAL_ECHOPAIR("Command: ", command_ptr);
SERIAL_ECHOPAIR(" (", command_letter);
SERIAL_ECHO(codenum);
SERIAL_ECHOLNPGM(")");
#if ENABLED(FASTER_GCODE_PARSER)
SERIAL_ECHO(" args: \"");
for (char c = 'A'; c <= 'Z'; ++c)
if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
#else
SERIAL_ECHOPAIR(" args: \"", command_args);
#endif
SERIAL_ECHOPGM("\"");
if (string_arg) {
SERIAL_ECHOPGM(" string: \"");
SERIAL_ECHO(string_arg);
SERIAL_CHAR('"');
}
SERIAL_ECHOPGM("\n\n");
for (char c = 'A'; c <= 'Z'; ++c) {
if (seen(c)) {
SERIAL_ECHOPAIR("Code '", c); SERIAL_ECHOPGM("':");
if (has_value()) {
SERIAL_ECHOPAIR("\n float: ", value_float());
SERIAL_ECHOPAIR("\n long: ", value_long());
SERIAL_ECHOPAIR("\n ulong: ", value_ulong());
SERIAL_ECHOPAIR("\n millis: ", value_millis());
SERIAL_ECHOPAIR("\n sec-ms: ", value_millis_from_seconds());
SERIAL_ECHOPAIR("\n int: ", value_int());
SERIAL_ECHOPAIR("\n ushort: ", value_ushort());
SERIAL_ECHOPAIR("\n byte: ", (int)value_byte());
SERIAL_ECHOPAIR("\n bool: ", (int)value_bool());
SERIAL_ECHOPAIR("\n linear: ", value_linear_units());
SERIAL_ECHOPAIR("\n celsius: ", value_celsius());
}
else
SERIAL_ECHOPGM(" (no value)");
SERIAL_ECHOPGM("\n\n");
}
}
}
#endif // DEBUG_GCODE_PARSER

@ -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 <http://www.gnu.org/licenses/>.
*
*/
/**
* gcode.h - Parser for a GCode line, providing a parameter interface.
* Codes like M149 control the way the GCode parser behaves,
* so settings for these codes are located in this class.
*/
#ifndef GCODE_H
#define GCODE_H
#include "enum.h"
#include "types.h"
#include "MarlinConfig.h"
//#define DEBUG_GCODE_PARSER
#if ENABLED(DEBUG_GCODE_PARSER)
#include "hex_print_routines.h"
#include "serial.h"
#endif
#if ENABLED(INCH_MODE_SUPPORT)
extern bool volumetric_enabled;
#endif
/**
* GCode parser
*
* - Parse a single gcode line for its letter, code, subcode, and parameters
* - FASTER_GCODE_PARSER:
* - Flags existing params (1 bit each)
* - Stores value offsets (1 byte each)
* - Provide accessors for parameters:
* - Parameter exists
* - Parameter has value
* - Parameter value in different units and types
*/
class GCodeParser {
private:
static char *value_ptr; // Set by seen, used to fetch the value
#if ENABLED(FASTER_GCODE_PARSER)
static byte codebits[4]; // Parameters pre-scanned
static uint8_t param[26]; // For A-Z, offsets into command args
#else
static char *command_args; // Args start here, for slow scan
#endif
public:
// Global states for GCode-level units features
#if ENABLED(INCH_MODE_SUPPORT)
static float linear_unit_factor, volumetric_unit_factor;
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
static TempUnit input_temp_units;
#endif
// Command line state
static char *command_ptr, // The command, so it can be echoed
*string_arg; // string of command line
static char command_letter; // G, M, or T
static int codenum; // 123
#if USE_GCODE_SUBCODES
static int subcode; // .1
#endif
#if ENABLED(DEBUG_GCODE_PARSER)
void debug();
#endif
// Reset is done before parsing
static void reset();
#if ENABLED(FASTER_GCODE_PARSER)
// Set the flag and pointer for a parameter
static void set(const char c, char * const ptr
#if ENABLED(DEBUG_GCODE_PARSER)
, const bool debug=false
#endif
) {
const uint8_t ind = c - 'A';
if (ind >= COUNT(param)) return; // Only A-Z
SBI(codebits[ind >> 3], ind & 0x7); // parameter exists
param[ind] = ptr ? ptr - command_ptr : 0; // parameter offset or 0
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) {
SERIAL_ECHOPAIR("Set bit ", (int)(ind & 0x7));
SERIAL_ECHOPAIR(" of index ", (int)(ind >> 3));
SERIAL_ECHOLNPAIR(" | param = ", hex_address((void*)param[ind]));
}
#endif
}
// Code seen bit was set. If not found, value_ptr is unchanged.
// This allows "if (seen('A')||seen('B'))" to use the last-found value.
static bool seen(const char c) {
const uint8_t ind = c - 'A';
if (ind >= COUNT(param)) return false; // Only A-Z
const bool b = TEST(codebits[ind >> 3], ind & 0x7);
if (b) value_ptr = command_ptr + param[ind];
return b;
}
#else
// Code is found in the string. If not found, value_ptr is unchanged.
// This allows "if (seen('A')||seen('B'))" to use the last-found value.
static bool seen(const char c) {
const char *p = strchr(command_args, c);
const bool b = !!p;
if (b) value_ptr = DECIMAL_SIGNED(p[1]) ? &p[1] : NULL;
return b;
}
#endif // FASTER_GCODE_PARSER
// Populate all fields by parsing a single line of GCode
// This uses 54 bytes of SRAM to speed up seen/value
static void parse(char * p);
// Code value pointer was set
FORCE_INLINE static bool has_value() { return value_ptr != NULL; }
// Float removes 'E' to prevent scientific notation interpretation
inline static float value_float() {
if (value_ptr) {
char *e = value_ptr;
for (;;) {
const char c = *e;
if (c == '\0' || c == ' ') break;
if (c == 'E' || c == 'e') {
*e = '\0';
const float ret = strtod(value_ptr, NULL);
*e = c;
return ret;
}
++e;
}
return strtod(value_ptr, NULL);
}
return 0.0;
}
// Code value as a long or ulong
inline static long value_long() { return value_ptr ? strtol(value_ptr, NULL, 10) : 0L; }
inline unsigned static long value_ulong() { return value_ptr ? strtoul(value_ptr, NULL, 10) : 0UL; }
// Code value for use as time
FORCE_INLINE static millis_t value_millis() { return value_ulong(); }
FORCE_INLINE static millis_t value_millis_from_seconds() { return value_float() * 1000UL; }
// Reduce to fewer bits
FORCE_INLINE static int value_int() { return (int)value_long(); }
FORCE_INLINE uint16_t value_ushort() { return (uint16_t)value_long(); }
inline static uint8_t value_byte() { return (uint8_t)(constrain(value_long(), 0, 255)); }
// Bool is true with no value or non-zero
inline static bool value_bool() { return !has_value() || value_byte(); }
// Units modes: Inches, Fahrenheit, Kelvin
#if ENABLED(INCH_MODE_SUPPORT)
inline static void set_input_linear_units(LinearUnit units) {
switch (units) {
case LINEARUNIT_INCH:
linear_unit_factor = 25.4;
break;
case LINEARUNIT_MM:
default:
linear_unit_factor = 1.0;
break;
}
volumetric_unit_factor = pow(linear_unit_factor, 3.0);
}
inline static float axis_unit_factor(const AxisEnum axis) {
return (axis >= E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor);
}
inline static float value_linear_units() { return value_float() * linear_unit_factor; }
inline static float value_axis_units(const AxisEnum axis) { return value_float() * axis_unit_factor(axis); }
inline static float value_per_axis_unit(const AxisEnum axis) { return value_float() / axis_unit_factor(axis); }
#else
FORCE_INLINE static float value_linear_units() { return value_float(); }
FORCE_INLINE static float value_axis_units(const AxisEnum a) { UNUSED(a); return value_float(); }
FORCE_INLINE static float value_per_axis_unit(const AxisEnum a) { UNUSED(a); return value_float(); }
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
inline static void set_input_temp_units(TempUnit units) { input_temp_units = units; }
#if ENABLED(ULTIPANEL) && DISABLED(DISABLE_M503)
FORCE_INLINE static char temp_units_code() {
return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C';
}
FORCE_INLINE static char* temp_units_name() {
return input_temp_units == TEMPUNIT_K ? PSTR("Kelvin") : input_temp_units == TEMPUNIT_F ? PSTR("Fahrenheit") : PSTR("Celsius")
}
inline static float to_temp_units(const float &f) {
switch (input_temp_units) {
case TEMPUNIT_F:
return f * 0.5555555556 + 32.0;
case TEMPUNIT_K:
return f + 273.15;
case TEMPUNIT_C:
default:
return f;
}
}
#endif // ULTIPANEL && !DISABLE_M503
inline static float value_celsius() {
const float f = value_float();
switch (input_temp_units) {
case TEMPUNIT_F:
return (f - 32.0) * 0.5555555556;
case TEMPUNIT_K:
return f - 273.15;
case TEMPUNIT_C:
default:
return f;
}
}
inline static float value_celsius_diff() {
switch (input_temp_units) {
case TEMPUNIT_F:
return value_float() * 0.5555555556;
case TEMPUNIT_C:
case TEMPUNIT_K:
default:
return value_float();
}
}
#else
FORCE_INLINE static float value_celsius() { return value_float(); }
FORCE_INLINE static float value_celsius_diff() { return value_float(); }
#endif
FORCE_INLINE static float value_feedrate() { return value_linear_units(); }
void unknown_command_error();
};
extern GCodeParser parser;
#endif // GCODE_H

@ -20,7 +20,9 @@
* *
*/ */
#include "Marlin.h" #include "Marlin.h"
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) #include "gcode.h"
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER)
#include "hex_print_routines.h" #include "hex_print_routines.h"
@ -50,4 +52,4 @@ void print_hex_byte(const uint8_t b) { SERIAL_ECHO(hex_byte(b)); }
void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); } void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); }
void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); } void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); }
#endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER #endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER || DEBUG_GCODE_PARSER

@ -24,8 +24,9 @@
#define HEX_PRINT_ROUTINES_H #define HEX_PRINT_ROUTINES_H
#include "MarlinConfig.h" #include "MarlinConfig.h"
#include "gcode.h"
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER)
// //
// Utility functions to create and print hex strings as nybble, byte, and word. // Utility functions to create and print hex strings as nybble, byte, and word.
@ -43,5 +44,5 @@ void print_hex_byte(const uint8_t b);
void print_hex_word(const uint16_t w); void print_hex_word(const uint16_t w);
void print_hex_address(const void * const w); void print_hex_address(const void * const w);
#endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER #endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER || DEBUG_GCODE_PARSER
#endif // HEX_PRINT_ROUTINES_H #endif // HEX_PRINT_ROUTINES_H

@ -155,7 +155,7 @@
#define MSG_FILAMENT_RUNOUT_SENSOR "filament: " #define MSG_FILAMENT_RUNOUT_SENSOR "filament: "
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)" #define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define MSG_ERR_M355_NONE "No case light" #define MSG_ERR_M355_NONE "No case light"
#define MSG_ERR_M421_PARAMETERS "M421 required parameters missing" #define MSG_ERR_M421_PARAMETERS "M421 incorrect parameter usage"
#define MSG_ERR_MESH_XY "Mesh point cannot be resolved" #define MSG_ERR_MESH_XY "Mesh point cannot be resolved"
#define MSG_ERR_ARC_ARGS "G2/G3 bad parameters" #define MSG_ERR_ARC_ARGS "G2/G3 bad parameters"
#define MSG_ERR_PROTECTED_PIN "Protected Pin" #define MSG_ERR_PROTECTED_PIN "Protected Pin"

@ -47,7 +47,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Encetar (pretar)") #define MSG_LEVEL_BED_WAITING _UxGT("Encetar (pretar)")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Vinient punto") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Vinient punto")
#define MSG_LEVEL_BED_DONE _UxGT("Nivelacion feita!") #define MSG_LEVEL_BED_DONE _UxGT("Nivelacion feita!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancelar")
#define MSG_SET_HOME_OFFSETS _UxGT("Achustar desfases") #define MSG_SET_HOME_OFFSETS _UxGT("Achustar desfases")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Desfase aplicau") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Desfase aplicau")
#define MSG_SET_ORIGIN _UxGT("Establir orichen") #define MSG_SET_ORIGIN _UxGT("Establir orichen")
@ -67,6 +66,7 @@
#define MSG_EXTRUDE _UxGT("Extruir") #define MSG_EXTRUDE _UxGT("Extruir")
#define MSG_RETRACT _UxGT("Retraer") #define MSG_RETRACT _UxGT("Retraer")
#define MSG_MOVE_AXIS _UxGT("Mover Eixes") #define MSG_MOVE_AXIS _UxGT("Mover Eixes")
#define MSG_BED_LEVELING _UxGT("Nivelar base")
#define MSG_LEVEL_BED _UxGT("Nivelar base") #define MSG_LEVEL_BED _UxGT("Nivelar base")
#define MSG_MOVE_X _UxGT("Mover X") #define MSG_MOVE_X _UxGT("Mover X")
#define MSG_MOVE_Y _UxGT("Mover Y") #define MSG_MOVE_Y _UxGT("Mover Y")
@ -94,6 +94,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Trigar") #define MSG_SELECT _UxGT("Trigar")
#define MSG_ACC _UxGT("Aceleracion") #define MSG_ACC _UxGT("Aceleracion")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -101,9 +102,11 @@
#define MSG_VMAX _UxGT("Vmax") #define MSG_VMAX _UxGT("Vmax")
#define MSG_VMIN _UxGT("Vmin") #define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("Vel. viache min") #define MSG_VTRAV_MIN _UxGT("Vel. viache min")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Acel. max") #define MSG_AMAX _UxGT("Acel. max")
#define MSG_A_RETRACT _UxGT("Acel. retrac.") #define MSG_A_RETRACT _UxGT("Acel. retrac.")
#define MSG_A_TRAVEL _UxGT("Acel. Viaje") #define MSG_A_TRAVEL _UxGT("Acel. Viaje")
#define MSG_STEPS_PER_MM _UxGT("Trangos/mm")
#define MSG_XSTEPS _UxGT("X trangos/mm") #define MSG_XSTEPS _UxGT("X trangos/mm")
#define MSG_YSTEPS _UxGT("Y trangos/mm") #define MSG_YSTEPS _UxGT("Y trangos/mm")
#define MSG_ZSTEPS _UxGT("Z trangos/mm") #define MSG_ZSTEPS _UxGT("Z trangos/mm")
@ -190,8 +193,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extrusors") #define MSG_INFO_EXTRUDERS _UxGT("Extrusors")
#define MSG_INFO_BAUDRATE _UxGT("Baudios") #define MSG_INFO_BAUDRATE _UxGT("Baudios")
#define MSG_INFO_PROTOCOL _UxGT("Protocolo") #define MSG_INFO_PROTOCOL _UxGT("Protocolo")
#define MSG_LIGHTS_ON _UxGT("Enchegar luz") #define MSG_CASE_LIGHT _UxGT("Luz")
#define MSG_LIGHTS_OFF _UxGT("Desenchegar luz")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Conteo de impresion") #define MSG_INFO_PRINT_COUNT _UxGT("Conteo de impresion")
@ -214,8 +216,8 @@
#define MSG_DRIVE_STRENGTH _UxGT("Fuerza d'o driver") #define MSG_DRIVE_STRENGTH _UxGT("Fuerza d'o driver")
#define MSG_DAC_PERCENT _UxGT("Driver %") #define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Escri. DAC EEPROM") #define MSG_DAC_EEPROM_WRITE _UxGT("Escri. DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("Cambear filamento") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Opcion de cambio:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruir mas") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruir mas")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Resumir imp.") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Resumir imp.")

@ -36,21 +36,11 @@
#define WELCOME_MSG MACHINE_NAME _UxGT(" Готов.") #define WELCOME_MSG MACHINE_NAME _UxGT(" Готов.")
#define MSG_SD_INSERTED _UxGT("Картата е поставена") #define MSG_SD_INSERTED _UxGT("Картата е поставена")
#define MSG_SD_REMOVED _UxGT("Картата е извадена") #define MSG_SD_REMOVED _UxGT("Картата е извадена")
#define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters
#define MSG_MAIN _UxGT("Меню") #define MSG_MAIN _UxGT("Меню")
#define MSG_AUTOSTART _UxGT("Автостарт") #define MSG_AUTOSTART _UxGT("Автостарт")
#define MSG_DISABLE_STEPPERS _UxGT("Изкл. двигатели") #define MSG_DISABLE_STEPPERS _UxGT("Изкл. двигатели")
#define MSG_AUTO_HOME _UxGT("Паркиране") #define MSG_AUTO_HOME _UxGT("Паркиране")
#define MSG_AUTO_HOME_X _UxGT("Home X")
#define MSG_AUTO_HOME_Y _UxGT("Home Y")
#define MSG_AUTO_HOME_Z _UxGT("Home Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Next Point")
#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancel")
#define MSG_SET_HOME_OFFSETS _UxGT("Задай Начало") #define MSG_SET_HOME_OFFSETS _UxGT("Задай Начало")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied")
#define MSG_SET_ORIGIN _UxGT("Изходна точка") #define MSG_SET_ORIGIN _UxGT("Изходна точка")
#define MSG_PREHEAT_1 _UxGT("Подгряване PLA") #define MSG_PREHEAT_1 _UxGT("Подгряване PLA")
#define MSG_PREHEAT_1_N _UxGT("Подгряване PLA") #define MSG_PREHEAT_1_N _UxGT("Подгряване PLA")
@ -68,6 +58,7 @@
#define MSG_EXTRUDE _UxGT("Екструзия") #define MSG_EXTRUDE _UxGT("Екструзия")
#define MSG_RETRACT _UxGT("Откат") #define MSG_RETRACT _UxGT("Откат")
#define MSG_MOVE_AXIS _UxGT("Движение по ос") #define MSG_MOVE_AXIS _UxGT("Движение по ос")
#define MSG_BED_LEVELING _UxGT("Нивелиране")
#define MSG_LEVEL_BED _UxGT("Нивелиране") #define MSG_LEVEL_BED _UxGT("Нивелиране")
#define MSG_MOVE_X _UxGT("Движение по X") #define MSG_MOVE_X _UxGT("Движение по X")
#define MSG_MOVE_Y _UxGT("Движение по Y") #define MSG_MOVE_Y _UxGT("Движение по Y")
@ -89,22 +80,9 @@
#define MSG_AUTOTEMP _UxGT("Авто-темп.") #define MSG_AUTOTEMP _UxGT("Авто-темп.")
#define MSG_ON _UxGT("Вкл. ") #define MSG_ON _UxGT("Вкл. ")
#define MSG_OFF _UxGT("Изкл. ") #define MSG_OFF _UxGT("Изкл. ")
#define MSG_PID_P _UxGT("PID-P")
#define MSG_PID_I _UxGT("PID-I")
#define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Select")
#define MSG_ACC _UxGT("Acc")
#define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk")
#define MSG_VE_JERK _UxGT("Ve-jerk")
#define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("VTrav min")
#define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-откат") #define MSG_A_RETRACT _UxGT("A-откат")
#define MSG_A_TRAVEL _UxGT("A-travel") #define MSG_A_TRAVEL _UxGT("A-travel")
#define MSG_STEPS_PER_MM _UxGT("Стъпки/mm")
#define MSG_XSTEPS _UxGT("X стъпки/mm") #define MSG_XSTEPS _UxGT("X стъпки/mm")
#define MSG_YSTEPS _UxGT("Y стъпки/mm") #define MSG_YSTEPS _UxGT("Y стъпки/mm")
#define MSG_ZSTEPS _UxGT("Z стъпки/mm") #define MSG_ZSTEPS _UxGT("Z стъпки/mm")
@ -151,100 +129,15 @@
#define MSG_INIT_SDCARD _UxGT("Иниц. SD-Карта") #define MSG_INIT_SDCARD _UxGT("Иниц. SD-Карта")
#define MSG_CNG_SDCARD _UxGT("Смяна SD-Карта") #define MSG_CNG_SDCARD _UxGT("Смяна SD-Карта")
#define MSG_ZPROBE_OUT _UxGT("Z-сондата е извадена") #define MSG_ZPROBE_OUT _UxGT("Z-сондата е извадена")
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("first")
#define MSG_ZPROBE_ZOFFSET _UxGT("Z Отстояние") #define MSG_ZPROBE_ZOFFSET _UxGT("Z Отстояние")
#define MSG_BABYSTEP_X _UxGT("Министъпка X") #define MSG_BABYSTEP_X _UxGT("Министъпка X")
#define MSG_BABYSTEP_Y _UxGT("Министъпка Y") #define MSG_BABYSTEP_Y _UxGT("Министъпка Y")
#define MSG_BABYSTEP_Z _UxGT("Министъпка Z") #define MSG_BABYSTEP_Z _UxGT("Министъпка Z")
#define MSG_ENDSTOP_ABORT _UxGT("Стоп Кр.Изключватели") #define MSG_ENDSTOP_ABORT _UxGT("Стоп Кр.Изключватели")
#define MSG_HEATING_FAILED_LCD _UxGT("Heating failed")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: REDUNDANT TEMP")
#define MSG_THERMAL_RUNAWAY _UxGT("THERMAL RUNAWAY")
#define MSG_ERR_MAXTEMP _UxGT("Err: MAXTEMP")
#define MSG_ERR_MINTEMP _UxGT("Err: MINTEMP")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err: MAXTEMP BED")
#define MSG_ERR_MINTEMP_BED _UxGT("Err: MINTEMP BED")
#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden")
#define MSG_HALTED _UxGT("PRINTER HALTED")
#define MSG_PLEASE_RESET _UxGT("Please reset")
#define MSG_SHORT_DAY _UxGT("d") // One character only
#define MSG_SHORT_HOUR _UxGT("h") // One character only
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("Heating...")
#define MSG_HEATING_COMPLETE _UxGT("Heating done.")
#define MSG_BED_HEATING _UxGT("Bed Heating.")
#define MSG_BED_DONE _UxGT("Bed done.")
#define MSG_DELTA_CALIBRATE _UxGT("Делта Калибровка") #define MSG_DELTA_CALIBRATE _UxGT("Делта Калибровка")
#define MSG_DELTA_CALIBRATE_X _UxGT("Калибровка X") #define MSG_DELTA_CALIBRATE_X _UxGT("Калибровка X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Калибровка Y") #define MSG_DELTA_CALIBRATE_Y _UxGT("Калибровка Y")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Калибровка Z") #define MSG_DELTA_CALIBRATE_Z _UxGT("Калибровка Z")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Калибровка Център") #define MSG_DELTA_CALIBRATE_CENTER _UxGT("Калибровка Център")
#define MSG_INFO_MENU _UxGT("About Printer")
#define MSG_INFO_PRINTER_MENU _UxGT("Printer Info")
#define MSG_INFO_STATS_MENU _UxGT("Printer Stats")
#define MSG_INFO_BOARD_MENU _UxGT("Board Info")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistors")
#define MSG_INFO_EXTRUDERS _UxGT("Extruders")
#define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_PROTOCOL _UxGT("Protocol")
#define MSG_LIGHTS_ON _UxGT("Case light on")
#define MSG_LIGHTS_OFF _UxGT("Case light off")
#if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Print Count")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completed")
#define MSG_INFO_PRINT_TIME _UxGT("Total print time")
#define MSG_INFO_PRINT_LONGEST _UxGT("Longest job time")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Extruded total")
#else
#define MSG_INFO_PRINT_COUNT _UxGT("Prints")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completed")
#define MSG_INFO_PRINT_TIME _UxGT("Total")
#define MSG_INFO_PRINT_LONGEST _UxGT("Longest")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Extruded")
#endif
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
#define MSG_INFO_MAX_TEMP _UxGT("Max Temp")
#define MSG_INFO_PSU _UxGT("Power Supply")
#define MSG_DRIVE_STRENGTH _UxGT("Drive Strength")
#define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("CHANGE FILAMENT")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("CHANGE OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrude more")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Resume print")
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Wait for start")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("of the filament")
#define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("change")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("filament unload")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insert filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("and press button")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("to continue...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("filament load")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("filament extrude")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wait for print")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("to resume")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Please wait...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejecting...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insert and Click")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Loading...")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Extruding...")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Resuming...")
#endif // LCD_HEIGHT < 4
#endif // LANGUAGE_BG_H #endif // LANGUAGE_BG_H

@ -50,7 +50,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Premeu per iniciar") #define MSG_LEVEL_BED_WAITING _UxGT("Premeu per iniciar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Següent punt") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Següent punt")
#define MSG_LEVEL_BED_DONE _UxGT("Anivellament fet!") #define MSG_LEVEL_BED_DONE _UxGT("Anivellament fet!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancel.la")
#define MSG_SET_HOME_OFFSETS _UxGT("Ajusta decalatge") #define MSG_SET_HOME_OFFSETS _UxGT("Ajusta decalatge")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Decalatge aplicat") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Decalatge aplicat")
#define MSG_SET_ORIGIN _UxGT("Estableix origen") #define MSG_SET_ORIGIN _UxGT("Estableix origen")
@ -70,6 +69,7 @@
#define MSG_EXTRUDE _UxGT("Extrudeix") #define MSG_EXTRUDE _UxGT("Extrudeix")
#define MSG_RETRACT _UxGT("Retreu") #define MSG_RETRACT _UxGT("Retreu")
#define MSG_MOVE_AXIS _UxGT("Mou eixos") #define MSG_MOVE_AXIS _UxGT("Mou eixos")
#define MSG_BED_LEVELING _UxGT("Anivella llit")
#define MSG_LEVEL_BED _UxGT("Anivella llit") #define MSG_LEVEL_BED _UxGT("Anivella llit")
#define MSG_MOVING _UxGT("Movent..") #define MSG_MOVING _UxGT("Movent..")
#define MSG_FREE_XY _UxGT("XY lliures") #define MSG_FREE_XY _UxGT("XY lliures")
@ -99,6 +99,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Select") #define MSG_SELECT _UxGT("Select")
#define MSG_ACC _UxGT("Accel") #define MSG_ACC _UxGT("Accel")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -109,6 +110,7 @@
#define MSG_AMAX _UxGT("Accel. max ") #define MSG_AMAX _UxGT("Accel. max ")
#define MSG_A_RETRACT _UxGT("Accel. retracc") #define MSG_A_RETRACT _UxGT("Accel. retracc")
#define MSG_A_TRAVEL _UxGT("Accel. Viatge") #define MSG_A_TRAVEL _UxGT("Accel. Viatge")
#define MSG_STEPS_PER_MM _UxGT("Passos/mm")
#define MSG_XSTEPS _UxGT("Xpassos/mm") #define MSG_XSTEPS _UxGT("Xpassos/mm")
#define MSG_YSTEPS _UxGT("Ypassos/mm") #define MSG_YSTEPS _UxGT("Ypassos/mm")
#define MSG_ZSTEPS _UxGT("Zpassos/mm") #define MSG_ZSTEPS _UxGT("Zpassos/mm")
@ -194,8 +196,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extrusors") #define MSG_INFO_EXTRUDERS _UxGT("Extrusors")
#define MSG_INFO_BAUDRATE _UxGT("Baud") #define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_PROTOCOL _UxGT("Protocol") #define MSG_INFO_PROTOCOL _UxGT("Protocol")
#define MSG_LIGHTS_ON _UxGT("Encen el llum") #define MSG_CASE_LIGHT _UxGT("Llum")
#define MSG_LIGHTS_OFF _UxGT("Apaga el llum")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Total impressions") #define MSG_INFO_PRINT_COUNT _UxGT("Total impressions")
@ -218,8 +219,8 @@
#define MSG_DRIVE_STRENGTH _UxGT("Força motor") #define MSG_DRIVE_STRENGTH _UxGT("Força motor")
#define MSG_DAC_PERCENT _UxGT("Driver %") #define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write") #define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("CANVI DE FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("OPCIONS CANVI:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrudeix mes") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrudeix mes")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Repren impressió") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Repren impressió")
#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Temp minima es ") #define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Temp minima es ")

@ -42,7 +42,6 @@
#define MSG_LEVEL_BED_HOMING "Homing XYZ" #define MSG_LEVEL_BED_HOMING "Homing XYZ"
#define MSG_LEVEL_BED_WAITING "Click to Begin" #define MSG_LEVEL_BED_WAITING "Click to Begin"
#define MSG_LEVEL_BED_DONE "Leveling Done!" #define MSG_LEVEL_BED_DONE "Leveling Done!"
#define MSG_LEVEL_BED_CANCEL "Cancel"
#define MSG_SET_HOME_OFFSETS "\xbe\xbf\xbb\xbc\xbd\xc0\xc1" #define MSG_SET_HOME_OFFSETS "\xbe\xbf\xbb\xbc\xbd\xc0\xc1"
#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" #define MSG_HOME_OFFSETS_APPLIED "Offsets applied"
#define MSG_SET_ORIGIN "\xbe\xbf\xbc\xbd" #define MSG_SET_ORIGIN "\xbe\xbf\xbc\xbd"
@ -62,6 +61,7 @@
#define MSG_EXTRUDE "\xcc\xad" #define MSG_EXTRUDE "\xcc\xad"
#define MSG_RETRACT "\xbb\xcd" #define MSG_RETRACT "\xbb\xcd"
#define MSG_MOVE_AXIS "\xc1\xb2\xce" #define MSG_MOVE_AXIS "\xc1\xb2\xce"
#define MSG_BED_LEVELING "\xcf\xe0\xc4\xc7"
#define MSG_LEVEL_BED "\xcf\xe0\xc4\xc7" #define MSG_LEVEL_BED "\xcf\xe0\xc4\xc7"
#define MSG_MOVE_X "\xc1\xb2 X" #define MSG_MOVE_X "\xc1\xb2 X"
#define MSG_MOVE_Y "\xc1\xb2 Y" #define MSG_MOVE_Y "\xc1\xb2 Y"
@ -87,6 +87,7 @@
#define MSG_PID_D "PID-D" #define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C" #define MSG_PID_C "PID-C"
#define MSG_ACC "Accel" #define MSG_ACC "Accel"
#define MSG_JERK "Jerk"
#define MSG_VX_JERK "Vx-jerk" #define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk" #define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
@ -97,6 +98,7 @@
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#define MSG_A_TRAVEL "A-travel" #define MSG_A_TRAVEL "A-travel"
#define MSG_STEPS_PER_MM "Steps/mm"
#define MSG_XSTEPS "Xsteps/mm" #define MSG_XSTEPS "Xsteps/mm"
#define MSG_YSTEPS "Ysteps/mm" #define MSG_YSTEPS "Ysteps/mm"
#define MSG_ZSTEPS "Zsteps/mm" #define MSG_ZSTEPS "Zsteps/mm"

@ -54,7 +54,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknutim spustte") #define MSG_LEVEL_BED_WAITING _UxGT("Kliknutim spustte")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Dalsi bod") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Dalsi bod")
#define MSG_LEVEL_BED_DONE _UxGT("Mereni hotovo!") #define MSG_LEVEL_BED_DONE _UxGT("Mereni hotovo!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Storno")
#define MSG_SET_HOME_OFFSETS _UxGT("Nastavit ofsety") #define MSG_SET_HOME_OFFSETS _UxGT("Nastavit ofsety")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Ofsety nastaveny") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Ofsety nastaveny")
#define MSG_SET_ORIGIN _UxGT("Nastavit pocatek") #define MSG_SET_ORIGIN _UxGT("Nastavit pocatek")
@ -76,6 +75,7 @@
#define MSG_EXTRUDE _UxGT("Vytlacit (extr.)") #define MSG_EXTRUDE _UxGT("Vytlacit (extr.)")
#define MSG_RETRACT _UxGT("Zatlacit (retr.)") #define MSG_RETRACT _UxGT("Zatlacit (retr.)")
#define MSG_MOVE_AXIS _UxGT("Posunout osy") #define MSG_MOVE_AXIS _UxGT("Posunout osy")
#define MSG_BED_LEVELING _UxGT("Vyrovnat podlozku")
#define MSG_LEVEL_BED _UxGT("Vyrovnat podlozku") #define MSG_LEVEL_BED _UxGT("Vyrovnat podlozku")
#define MSG_MOVING _UxGT("Posunování...") #define MSG_MOVING _UxGT("Posunování...")
#define MSG_FREE_XY _UxGT("Uvolnit XY") #define MSG_FREE_XY _UxGT("Uvolnit XY")
@ -105,6 +105,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Vybrat") #define MSG_SELECT _UxGT("Vybrat")
#define MSG_ACC _UxGT("Zrychl") #define MSG_ACC _UxGT("Zrychl")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -115,6 +116,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retrakt") #define MSG_A_RETRACT _UxGT("A-retrakt")
#define MSG_A_TRAVEL _UxGT("A-prejezd") #define MSG_A_TRAVEL _UxGT("A-prejezd")
#define MSG_STEPS_PER_MM _UxGT("Kroku/mm")
#define MSG_XSTEPS _UxGT("Xkroku/mm") #define MSG_XSTEPS _UxGT("Xkroku/mm")
#define MSG_YSTEPS _UxGT("Ykroku/mm") #define MSG_YSTEPS _UxGT("Ykroku/mm")
#define MSG_ZSTEPS _UxGT("Zkroku/mm") #define MSG_ZSTEPS _UxGT("Zkroku/mm")
@ -203,8 +205,8 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extrudery") #define MSG_INFO_EXTRUDERS _UxGT("Extrudery")
#define MSG_INFO_BAUDRATE _UxGT("Rychlost") #define MSG_INFO_BAUDRATE _UxGT("Rychlost")
#define MSG_INFO_PROTOCOL _UxGT("Protokol") #define MSG_INFO_PROTOCOL _UxGT("Protokol")
#define MSG_LIGHTS_ON _UxGT("Osvetleni Zap") #define MSG_CASE_LIGHT _UxGT("Osvetleni")
#define MSG_LIGHTS_OFF _UxGT("Osvetleni Vyp")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Pocet tisku") #define MSG_INFO_PRINT_COUNT _UxGT("Pocet tisku")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Dokonceno") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Dokonceno")
@ -218,6 +220,7 @@
#define MSG_INFO_PRINT_LONGEST _UxGT("Nejdelsi") #define MSG_INFO_PRINT_LONGEST _UxGT("Nejdelsi")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Vytlaceno") #define MSG_INFO_PRINT_FILAMENT _UxGT("Vytlaceno")
#endif #endif
#define MSG_INFO_MIN_TEMP _UxGT("Teplota min") #define MSG_INFO_MIN_TEMP _UxGT("Teplota min")
#define MSG_INFO_MAX_TEMP _UxGT("Teplota max") #define MSG_INFO_MAX_TEMP _UxGT("Teplota max")
#define MSG_INFO_PSU _UxGT("Nap. zdroj") #define MSG_INFO_PSU _UxGT("Nap. zdroj")
@ -225,8 +228,8 @@
#define MSG_DAC_PERCENT _UxGT("Motor %") #define MSG_DAC_PERCENT _UxGT("Motor %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Ulozit do EEPROM") #define MSG_DAC_EEPROM_WRITE _UxGT("Ulozit do EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("VYMENA FILAMENTU") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("CO DAL?") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Jeste vytlacit") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Jeste vytlacit")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Obnovit tisk") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Obnovit tisk")
#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Min. teplota je ") #define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Min. teplota je ")

@ -48,7 +48,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Klik når du er klar") #define MSG_LEVEL_BED_WAITING _UxGT("Klik når du er klar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Næste punkt") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Næste punkt")
#define MSG_LEVEL_BED_DONE _UxGT("Bed level er færdig!") #define MSG_LEVEL_BED_DONE _UxGT("Bed level er færdig!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Annuller bed level")
#define MSG_SET_HOME_OFFSETS _UxGT("Sæt forsk. af home") #define MSG_SET_HOME_OFFSETS _UxGT("Sæt forsk. af home")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Forsk. er nu aktiv") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Forsk. er nu aktiv")
#define MSG_SET_ORIGIN _UxGT("Sæt origin") #define MSG_SET_ORIGIN _UxGT("Sæt origin")
@ -68,6 +67,7 @@
#define MSG_EXTRUDE _UxGT("Extruder") #define MSG_EXTRUDE _UxGT("Extruder")
#define MSG_RETRACT _UxGT("Retract") #define MSG_RETRACT _UxGT("Retract")
#define MSG_MOVE_AXIS _UxGT("Flyt akser") #define MSG_MOVE_AXIS _UxGT("Flyt akser")
#define MSG_BED_LEVELING _UxGT("Juster bed")
#define MSG_LEVEL_BED _UxGT("Juster bed") #define MSG_LEVEL_BED _UxGT("Juster bed")
#define MSG_MOVE_X _UxGT("Flyt X") #define MSG_MOVE_X _UxGT("Flyt X")
#define MSG_MOVE_Y _UxGT("Flyt Y") #define MSG_MOVE_Y _UxGT("Flyt Y")
@ -96,6 +96,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Vælg") #define MSG_SELECT _UxGT("Vælg")
#define MSG_ACC _UxGT("Accel") #define MSG_ACC _UxGT("Accel")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -106,6 +107,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retract") #define MSG_A_RETRACT _UxGT("A-retract")
#define MSG_A_TRAVEL _UxGT("A-rejse") #define MSG_A_TRAVEL _UxGT("A-rejse")
#define MSG_STEPS_PER_MM _UxGT("Steps/mm")
#define MSG_XSTEPS _UxGT("Xsteps/mm") #define MSG_XSTEPS _UxGT("Xsteps/mm")
#define MSG_YSTEPS _UxGT("Ysteps/mm") #define MSG_YSTEPS _UxGT("Ysteps/mm")
#define MSG_ZSTEPS _UxGT("Zsteps/mm") #define MSG_ZSTEPS _UxGT("Zsteps/mm")
@ -215,8 +217,8 @@
#define MSG_DAC_PERCENT _UxGT("Driv %") #define MSG_DAC_PERCENT _UxGT("Driv %")
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Skriv") #define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Skriv")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("SKIFT FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Skift muligheder:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruder mere") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruder mere")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Forsæt print") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Forsæt print")

@ -51,7 +51,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Klick für Start") #define MSG_LEVEL_BED_WAITING _UxGT("Klick für Start")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Nächste Koordinate") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Nächste Koordinate")
#define MSG_LEVEL_BED_DONE _UxGT("Fertig") #define MSG_LEVEL_BED_DONE _UxGT("Fertig")
#define MSG_LEVEL_BED_CANCEL _UxGT("Abbruch")
#define MSG_SET_HOME_OFFSETS _UxGT("Setze Homeversatz") #define MSG_SET_HOME_OFFSETS _UxGT("Setze Homeversatz")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Homeversatz aktiv") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Homeversatz aktiv")
#define MSG_SET_ORIGIN _UxGT("Setze Nullpunkt") //"G92 X0 Y0 Z0" commented out in ultralcd.cpp #define MSG_SET_ORIGIN _UxGT("Setze Nullpunkt") //"G92 X0 Y0 Z0" commented out in ultralcd.cpp
@ -73,6 +72,7 @@
#define MSG_EXTRUDE _UxGT("Extrudieren") #define MSG_EXTRUDE _UxGT("Extrudieren")
#define MSG_RETRACT _UxGT("Retract") #define MSG_RETRACT _UxGT("Retract")
#define MSG_MOVE_AXIS _UxGT("Bewegen") #define MSG_MOVE_AXIS _UxGT("Bewegen")
#define MSG_BED_LEVELING _UxGT("Bett nivellieren")
#define MSG_LEVEL_BED _UxGT("Bett nivellieren") #define MSG_LEVEL_BED _UxGT("Bett nivellieren")
#define MSG_MOVING _UxGT("In Bewegung...") #define MSG_MOVING _UxGT("In Bewegung...")
#define MSG_FREE_XY _UxGT("Abstand XY") #define MSG_FREE_XY _UxGT("Abstand XY")
@ -102,6 +102,7 @@
#define MSG_PID_C _UxGT("PID C") #define MSG_PID_C _UxGT("PID C")
#define MSG_SELECT _UxGT("Auswählen") #define MSG_SELECT _UxGT("Auswählen")
#define MSG_ACC _UxGT("A") #define MSG_ACC _UxGT("A")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("V X Jerk") #define MSG_VX_JERK _UxGT("V X Jerk")
#define MSG_VY_JERK _UxGT("V Y Jerk") #define MSG_VY_JERK _UxGT("V Y Jerk")
#define MSG_VZ_JERK _UxGT("V Z Jerk") #define MSG_VZ_JERK _UxGT("V Z Jerk")
@ -112,6 +113,7 @@
#define MSG_AMAX _UxGT("A max ") // space by purpose #define MSG_AMAX _UxGT("A max ") // space by purpose
#define MSG_A_RETRACT _UxGT("A Retract") #define MSG_A_RETRACT _UxGT("A Retract")
#define MSG_A_TRAVEL _UxGT("A Leerfahrt") #define MSG_A_TRAVEL _UxGT("A Leerfahrt")
#define MSG_STEPS_PER_MM _UxGT("Steps/mm")
#define MSG_XSTEPS _UxGT("X Steps/mm") #define MSG_XSTEPS _UxGT("X Steps/mm")
#define MSG_YSTEPS _UxGT("Y Steps/mm") #define MSG_YSTEPS _UxGT("Y Steps/mm")
#define MSG_ZSTEPS _UxGT("Z Steps/mm") #define MSG_ZSTEPS _UxGT("Z Steps/mm")
@ -203,8 +205,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extruder") #define MSG_INFO_EXTRUDERS _UxGT("Extruder")
#define MSG_INFO_BAUDRATE _UxGT("Baud") #define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_PROTOCOL _UxGT("Protokoll") #define MSG_INFO_PROTOCOL _UxGT("Protokoll")
#define MSG_LIGHTS_ON _UxGT("Gehäuse Licht an") #define MSG_CASE_LIGHT _UxGT("Licht")
#define MSG_LIGHTS_OFF _UxGT("Gehäuse Licht aus")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Gesamte Drucke") #define MSG_INFO_PRINT_COUNT _UxGT("Gesamte Drucke")
@ -219,6 +220,7 @@
#define MSG_INFO_PRINT_LONGEST _UxGT("Längster") #define MSG_INFO_PRINT_LONGEST _UxGT("Längster")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Extrud.") #define MSG_INFO_PRINT_FILAMENT _UxGT("Extrud.")
#endif #endif
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp") #define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
#define MSG_INFO_MAX_TEMP _UxGT("Max Temp") #define MSG_INFO_MAX_TEMP _UxGT("Max Temp")
#define MSG_INFO_PSU _UxGT("Stromversorgung") #define MSG_INFO_PSU _UxGT("Stromversorgung")
@ -227,8 +229,8 @@
#define MSG_DAC_PERCENT _UxGT("Treiber %") #define MSG_DAC_PERCENT _UxGT("Treiber %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Werte speichern") #define MSG_DAC_EEPROM_WRITE _UxGT("Werte speichern")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("ÄNDERE FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ÄNDERE OPTIONEN:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrude mehr") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrude mehr")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Drucke weiter") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Drucke weiter")
#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Min. Temperatur ist ") #define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Min. Temperatur ist ")

@ -48,7 +48,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Κάντε κλικ για να ξεκινήσετε") #define MSG_LEVEL_BED_WAITING _UxGT("Κάντε κλικ για να ξεκινήσετε")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Επόμενο σημείο") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Επόμενο σημείο")
#define MSG_LEVEL_BED_DONE _UxGT("Ολοκλήρωση επιπεδοποίησης!") #define MSG_LEVEL_BED_DONE _UxGT("Ολοκλήρωση επιπεδοποίησης!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Ακύρωση")
#define MSG_SET_HOME_OFFSETS _UxGT("Ορισμός βασικών μετατοπίσεων") #define MSG_SET_HOME_OFFSETS _UxGT("Ορισμός βασικών μετατοπίσεων")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Εφαρμόστηκαν οι μετατοπίσεις") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Εφαρμόστηκαν οι μετατοπίσεις")
#define MSG_SET_ORIGIN _UxGT("Ορισμός προέλευσης") #define MSG_SET_ORIGIN _UxGT("Ορισμός προέλευσης")
@ -68,6 +67,7 @@
#define MSG_EXTRUDE _UxGT("Εξώθηση") #define MSG_EXTRUDE _UxGT("Εξώθηση")
#define MSG_RETRACT _UxGT("Ανάσυρση") #define MSG_RETRACT _UxGT("Ανάσυρση")
#define MSG_MOVE_AXIS _UxGT("Μετακίνηση άξονα") #define MSG_MOVE_AXIS _UxGT("Μετακίνηση άξονα")
#define MSG_BED_LEVELING _UxGT("Επιπεδοποίηση κλίνης")
#define MSG_LEVEL_BED _UxGT("Επιπεδοποίηση κλίνης") #define MSG_LEVEL_BED _UxGT("Επιπεδοποίηση κλίνης")
#define MSG_MOVE_X _UxGT("Μετακίνηση X") #define MSG_MOVE_X _UxGT("Μετακίνηση X")
#define MSG_MOVE_Y _UxGT("Μετακίνηση Y") #define MSG_MOVE_Y _UxGT("Μετακίνηση Y")
@ -94,6 +94,7 @@
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_ACC _UxGT("Επιτάχυνση") #define MSG_ACC _UxGT("Επιτάχυνση")
#define MSG_JERK _UxGT("Vαντίδραση")
#define MSG_VX_JERK _UxGT("Vαντίδραση x") #define MSG_VX_JERK _UxGT("Vαντίδραση x")
#define MSG_VY_JERK _UxGT("Vαντίδραση y") #define MSG_VY_JERK _UxGT("Vαντίδραση y")
#define MSG_VZ_JERK _UxGT("Vαντίδραση z") #define MSG_VZ_JERK _UxGT("Vαντίδραση z")
@ -101,9 +102,11 @@
#define MSG_VMAX _UxGT("Vμεγ ") #define MSG_VMAX _UxGT("Vμεγ ")
#define MSG_VMIN _UxGT("Vελαχ") #define MSG_VMIN _UxGT("Vελαχ")
#define MSG_VTRAV_MIN _UxGT("Vελάχ. μετατόπιση") #define MSG_VTRAV_MIN _UxGT("Vελάχ. μετατόπιση")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Aμεγ ") #define MSG_AMAX _UxGT("Aμεγ ")
#define MSG_A_RETRACT _UxGT("Α-ανάσυρση") #define MSG_A_RETRACT _UxGT("Α-ανάσυρση")
#define MSG_A_TRAVEL _UxGT("Α-μετατόπιση") #define MSG_A_TRAVEL _UxGT("Α-μετατόπιση")
#define MSG_STEPS_PER_MM _UxGT("Bήματα ανά μμ")
#define MSG_XSTEPS _UxGT("Bήματα X ανά μμ") #define MSG_XSTEPS _UxGT("Bήματα X ανά μμ")
#define MSG_YSTEPS _UxGT("Bήματα Υ ανά μμ") #define MSG_YSTEPS _UxGT("Bήματα Υ ανά μμ")
#define MSG_ZSTEPS _UxGT("Bήματα Ζ ανά μμ") #define MSG_ZSTEPS _UxGT("Bήματα Ζ ανά μμ")

@ -48,7 +48,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Επιπεδοποίηση επ. Εκτύπωσης περιμενει") //SHORTEN #define MSG_LEVEL_BED_WAITING _UxGT("Επιπεδοποίηση επ. Εκτύπωσης περιμενει") //SHORTEN
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Επόμενο σημείο") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Επόμενο σημείο")
#define MSG_LEVEL_BED_DONE _UxGT("Ολοκλήρωση επιπεδοποίησης!") //SHORTEN #define MSG_LEVEL_BED_DONE _UxGT("Ολοκλήρωση επιπεδοποίησης!") //SHORTEN
#define MSG_LEVEL_BED_CANCEL _UxGT("Ακύρωση")
#define MSG_SET_HOME_OFFSETS _UxGT("Ορισμός βασικών μετατοπίσεων") //SHORTEN #define MSG_SET_HOME_OFFSETS _UxGT("Ορισμός βασικών μετατοπίσεων") //SHORTEN
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Εφαρμόστηκαν οι μετατοπίσεις") //SHORTEN #define MSG_HOME_OFFSETS_APPLIED _UxGT("Εφαρμόστηκαν οι μετατοπίσεις") //SHORTEN
#define MSG_SET_ORIGIN _UxGT("Ορισμός προέλευσης") #define MSG_SET_ORIGIN _UxGT("Ορισμός προέλευσης")
@ -68,6 +67,7 @@
#define MSG_EXTRUDE _UxGT("Εξώθηση") #define MSG_EXTRUDE _UxGT("Εξώθηση")
#define MSG_RETRACT _UxGT("Ανάσυρση") #define MSG_RETRACT _UxGT("Ανάσυρση")
#define MSG_MOVE_AXIS _UxGT("Μετακίνηση άξονα") #define MSG_MOVE_AXIS _UxGT("Μετακίνηση άξονα")
#define MSG_BED_LEVELING _UxGT("Επιπεδοποίηση Επ. Εκτύπωσης") //SHORTEN
#define MSG_LEVEL_BED _UxGT("Επιπεδοποίηση Επ. Εκτύπωσης") //SHORTEN #define MSG_LEVEL_BED _UxGT("Επιπεδοποίηση Επ. Εκτύπωσης") //SHORTEN
#define MSG_MOVE_X _UxGT("Μετακίνηση X") #define MSG_MOVE_X _UxGT("Μετακίνηση X")
#define MSG_MOVE_Y _UxGT("Μετακίνηση Y") #define MSG_MOVE_Y _UxGT("Μετακίνηση Y")
@ -94,6 +94,7 @@
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_ACC _UxGT("Επιτάχυνση") #define MSG_ACC _UxGT("Επιτάχυνση")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vαντίδραση x") #define MSG_VX_JERK _UxGT("Vαντίδραση x")
#define MSG_VY_JERK _UxGT("Vαντίδραση y") #define MSG_VY_JERK _UxGT("Vαντίδραση y")
#define MSG_VZ_JERK _UxGT("Vαντίδραση z") #define MSG_VZ_JERK _UxGT("Vαντίδραση z")
@ -101,9 +102,11 @@
#define MSG_VMAX _UxGT("V Μέγιστο") #define MSG_VMAX _UxGT("V Μέγιστο")
#define MSG_VMIN _UxGT("V Ελάχιστο") #define MSG_VMIN _UxGT("V Ελάχιστο")
#define MSG_VTRAV_MIN _UxGT("Vελάχ. μετατόπιση") #define MSG_VTRAV_MIN _UxGT("Vελάχ. μετατόπιση")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Aμεγ ") #define MSG_AMAX _UxGT("Aμεγ ")
#define MSG_A_RETRACT _UxGT("Α-ανάσυρση") #define MSG_A_RETRACT _UxGT("Α-ανάσυρση")
#define MSG_A_TRAVEL _UxGT("Α-μετατόπιση") #define MSG_A_TRAVEL _UxGT("Α-μετατόπιση")
#define MSG_STEPS_PER_MM _UxGT("Bήματα ανά μμ")
#define MSG_XSTEPS _UxGT("Bήματα X ανά μμ") #define MSG_XSTEPS _UxGT("Bήματα X ανά μμ")
#define MSG_YSTEPS _UxGT("Bήματα Υ ανά μμ") #define MSG_YSTEPS _UxGT("Bήματα Υ ανά μμ")
#define MSG_ZSTEPS _UxGT("Bήματα Ζ ανά μμ") #define MSG_ZSTEPS _UxGT("Bήματα Ζ ανά μμ")

@ -84,8 +84,8 @@
#ifndef MSG_LEVEL_BED_DONE #ifndef MSG_LEVEL_BED_DONE
#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!") #define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!")
#endif #endif
#ifndef MSG_LEVEL_BED_CANCEL #ifndef MSG_Z_FADE_HEIGHT
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancel") #define MSG_Z_FADE_HEIGHT _UxGT("Fade Height")
#endif #endif
#ifndef MSG_SET_HOME_OFFSETS #ifndef MSG_SET_HOME_OFFSETS
#define MSG_SET_HOME_OFFSETS _UxGT("Set home offsets") #define MSG_SET_HOME_OFFSETS _UxGT("Set home offsets")
@ -150,9 +150,154 @@
#ifndef MSG_MOVE_AXIS #ifndef MSG_MOVE_AXIS
#define MSG_MOVE_AXIS _UxGT("Move axis") #define MSG_MOVE_AXIS _UxGT("Move axis")
#endif #endif
#ifndef MSG_BED_LEVELING
#define MSG_BED_LEVELING _UxGT("Bed Leveling")
#endif
#ifndef MSG_LEVEL_BED #ifndef MSG_LEVEL_BED
#define MSG_LEVEL_BED _UxGT("Level bed") #define MSG_LEVEL_BED _UxGT("Level bed")
#endif #endif
#ifndef MSG_USER_MENU
#define MSG_USER_MENU _UxGT("Custom Commands")
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
#ifndef MSG_UBL_UNHOMED
#define MSG_UBL_UNHOMED _UxGT("Home XYZ first")
#endif
#ifndef MSG_UBL_TOOLS
#define MSG_UBL_TOOLS _UxGT("UBL Tools")
#endif
#ifndef MSG_UBL_LEVEL_BED
#define MSG_UBL_LEVEL_BED _UxGT("Unified Bed Leveling")
#endif
#ifndef MSG_UBL_ACTIVATE_MESH
#define MSG_UBL_ACTIVATE_MESH _UxGT("Activate UBL")
#endif
#ifndef MSG_UBL_DEACTIVATE_MESH
#define MSG_UBL_DEACTIVATE_MESH _UxGT("Deactivate UBL")
#endif
#ifndef MSG_UBL_SET_BED_TEMP
#define MSG_UBL_SET_BED_TEMP _UxGT("Bed Temp")
#endif
#ifndef MSG_UBL_CUSTOM_BED_TEMP
#define MSG_UBL_CUSTOM_BED_TEMP MSG_UBL_SET_BED_TEMP
#endif
#ifndef MSG_UBL_SET_HOTEND_TEMP
#define MSG_UBL_SET_HOTEND_TEMP _UxGT("Hotend Temp")
#endif
#ifndef MSG_UBL_CUSTOM_HOTEND_TEMP
#define MSG_UBL_CUSTOM_HOTEND_TEMP MSG_UBL_SET_HOTEND_TEMP
#endif
#ifndef MSG_UBL_EDIT_CUSTOM_MESH
#define MSG_UBL_EDIT_CUSTOM_MESH _UxGT("Edit Custom Mesh")
#endif
#ifndef MSG_UBL_BUILD_CUSTOM_MESH
#define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("Build Custom Mesh")
#endif
#ifndef MSG_UBL_BUILD_MESH_MENU
#define MSG_UBL_BUILD_MESH_MENU _UxGT("Build Mesh")
#endif
#ifndef MSG_UBL_BUILD_PLA_MESH
#define MSG_UBL_BUILD_PLA_MESH _UxGT("Build PLA Mesh")
#endif
#ifndef MSG_UBL_BUILD_ABS_MESH
#define MSG_UBL_BUILD_ABS_MESH _UxGT("Build ABS Mesh")
#endif
#ifndef MSG_UBL_BUILD_COLD_MESH
#define MSG_UBL_BUILD_COLD_MESH _UxGT("Build Cold Mesh")
#endif
#ifndef MSG_UBL_MESH_HEIGHT_ADJUST
#define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("Adjust Mesh Height")
#endif
#ifndef MSG_UBL_MESH_HEIGHT_AMOUNT
#define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("Height Amount")
#endif
#ifndef MSG_UBL_VALIDATE_MESH_MENU
#define MSG_UBL_VALIDATE_MESH_MENU _UxGT("Validate Mesh")
#endif
#ifndef MSG_UBL_VALIDATE_PLA_MESH
#define MSG_UBL_VALIDATE_PLA_MESH _UxGT("Validate PLA Mesh")
#endif
#ifndef MSG_UBL_VALIDATE_ABS_MESH
#define MSG_UBL_VALIDATE_ABS_MESH _UxGT("Validate ABS Mesh")
#endif
#ifndef MSG_UBL_VALIDATE_CUSTOM_MESH
#define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("Validate Custom Mesh")
#endif
#ifndef MSG_UBL_CONTINUE_MESH
#define MSG_UBL_CONTINUE_MESH _UxGT("Continue Bed Mesh")
#endif
#ifndef MSG_UBL_MESH_LEVELING
#define MSG_UBL_MESH_LEVELING _UxGT("Mesh Leveling")
#endif
#ifndef MSG_UBL_3POINT_MESH_LEVELING
#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("3-Point Leveling")
#endif
#ifndef MSG_UBL_GRID_MESH_LEVELING
#define MSG_UBL_GRID_MESH_LEVELING _UxGT("Grid Mesh Leveling")
#endif
#ifndef MSG_UBL_MESH_LEVEL
#define MSG_UBL_MESH_LEVEL _UxGT("Level Mesh")
#endif
#ifndef MSG_UBL_SIDE_POINTS
#define MSG_UBL_SIDE_POINTS _UxGT("Side Points")
#endif
#ifndef MSG_UBL_MAP_TYPE
#define MSG_UBL_MAP_TYPE _UxGT("Map Type")
#endif
#ifndef MSG_UBL_OUTPUT_MAP
#define MSG_UBL_OUTPUT_MAP _UxGT("Output Mesh Map")
#endif
#ifndef MSG_UBL_OUTPUT_MAP_HOST
#define MSG_UBL_OUTPUT_MAP_HOST _UxGT("Output for Host")
#endif
#ifndef MSG_UBL_OUTPUT_MAP_CSV
#define MSG_UBL_OUTPUT_MAP_CSV _UxGT("Output for CSV")
#endif
#ifndef MSG_UBL_INFO_UBL
#define MSG_UBL_INFO_UBL _UxGT("Output UBL Info")
#endif
#ifndef MSG_UBL_EDIT_MESH_MENU
#define MSG_UBL_EDIT_MESH_MENU _UxGT("Edit Mesh")
#endif
#ifndef MSG_UBL_FILLIN_AMOUNT
#define MSG_UBL_FILLIN_AMOUNT _UxGT("Fill-in Amount")
#endif
#ifndef MSG_UBL_MANUAL_FILLIN
#define MSG_UBL_MANUAL_FILLIN _UxGT("Manual Fill-in")
#endif
#ifndef MSG_UBL_SMART_FILLIN
#define MSG_UBL_SMART_FILLIN _UxGT("Smart Fill-in")
#endif
#ifndef MSG_UBL_FILLIN_MESH
#define MSG_UBL_FILLIN_MESH _UxGT("Fill-in Mesh")
#endif
#ifndef MSG_UBL_INVALIDATE_ALL
#define MSG_UBL_INVALIDATE_ALL _UxGT("Invalidate All")
#endif
#ifndef MSG_UBL_INVALIDATE_CLOSEST
#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("Invalidate Closest")
#endif
#ifndef MSG_UBL_FINE_TUNE_ALL
#define MSG_UBL_FINE_TUNE_ALL _UxGT("Fine Tune All")
#endif
#ifndef MSG_UBL_FINE_TUNE_CLOSEST
#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Fine Tune Closest")
#endif
#ifndef MSG_UBL_STORAGE_MESH_MENU
#define MSG_UBL_STORAGE_MESH_MENU _UxGT("Mesh Storage")
#endif
#ifndef MSG_UBL_STORAGE_SLOT
#define MSG_UBL_STORAGE_SLOT _UxGT("Memory Slot")
#endif
#ifndef MSG_UBL_LOAD_MESH
#define MSG_UBL_LOAD_MESH _UxGT("Load Bed Mesh")
#endif
#ifndef MSG_UBL_SAVE_MESH
#define MSG_UBL_SAVE_MESH _UxGT("Save Bed Mesh")
#endif
#endif // AUTO_BED_LEVELING_UBL
#ifndef MSG_MOVING #ifndef MSG_MOVING
#define MSG_MOVING _UxGT("Moving...") #define MSG_MOVING _UxGT("Moving...")
#endif #endif
@ -237,6 +382,9 @@
#ifndef MSG_ACC #ifndef MSG_ACC
#define MSG_ACC _UxGT("Accel") #define MSG_ACC _UxGT("Accel")
#endif #endif
#ifndef MSG_JERK
#define MSG_JERK _UxGT("Jerk")
#endif
#ifndef MSG_VX_JERK #ifndef MSG_VX_JERK
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#endif #endif
@ -249,6 +397,9 @@
#ifndef MSG_VE_JERK #ifndef MSG_VE_JERK
#define MSG_VE_JERK _UxGT("Ve-jerk") #define MSG_VE_JERK _UxGT("Ve-jerk")
#endif #endif
#ifndef MSG_VELOCITY
#define MSG_VELOCITY _UxGT("Velocity")
#endif
#ifndef MSG_VMAX #ifndef MSG_VMAX
#define MSG_VMAX _UxGT("Vmax ") #define MSG_VMAX _UxGT("Vmax ")
#endif #endif
@ -258,6 +409,9 @@
#ifndef MSG_VTRAV_MIN #ifndef MSG_VTRAV_MIN
#define MSG_VTRAV_MIN _UxGT("VTrav min") #define MSG_VTRAV_MIN _UxGT("VTrav min")
#endif #endif
#ifndef MSG_ACCELERATION
#define MSG_ACCELERATION _UxGT("Acceleration")
#endif
#ifndef MSG_AMAX #ifndef MSG_AMAX
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#endif #endif
@ -267,6 +421,9 @@
#ifndef MSG_A_TRAVEL #ifndef MSG_A_TRAVEL
#define MSG_A_TRAVEL _UxGT("A-travel") #define MSG_A_TRAVEL _UxGT("A-travel")
#endif #endif
#ifndef MSG_STEPS_PER_MM
#define MSG_STEPS_PER_MM _UxGT("Steps/mm")
#endif
#ifndef MSG_XSTEPS #ifndef MSG_XSTEPS
#define MSG_XSTEPS _UxGT("Xsteps/mm") #define MSG_XSTEPS _UxGT("Xsteps/mm")
#endif #endif
@ -316,14 +473,17 @@
#define MSG_CONTRAST _UxGT("LCD contrast") #define MSG_CONTRAST _UxGT("LCD contrast")
#endif #endif
#ifndef MSG_STORE_EEPROM #ifndef MSG_STORE_EEPROM
#define MSG_STORE_EEPROM _UxGT("Store memory") #define MSG_STORE_EEPROM _UxGT("Store settings")
#endif #endif
#ifndef MSG_LOAD_EEPROM #ifndef MSG_LOAD_EEPROM
#define MSG_LOAD_EEPROM _UxGT("Load memory") #define MSG_LOAD_EEPROM _UxGT("Load settings")
#endif #endif
#ifndef MSG_RESTORE_FAILSAFE #ifndef MSG_RESTORE_FAILSAFE
#define MSG_RESTORE_FAILSAFE _UxGT("Restore failsafe") #define MSG_RESTORE_FAILSAFE _UxGT("Restore failsafe")
#endif #endif
#ifndef MSG_INIT_EEPROM
#define MSG_INIT_EEPROM _UxGT("Initialize EEPROM")
#endif
#ifndef MSG_REFRESH #ifndef MSG_REFRESH
#define MSG_REFRESH _UxGT("Refresh") #define MSG_REFRESH _UxGT("Refresh")
#endif #endif
@ -357,6 +517,9 @@
#ifndef MSG_USERWAIT #ifndef MSG_USERWAIT
#define MSG_USERWAIT _UxGT("Click to resume...") #define MSG_USERWAIT _UxGT("Click to resume...")
#endif #endif
#ifndef MSG_PRINT_PAUSED
#define MSG_PRINT_PAUSED _UxGT("Print paused")
#endif
#ifndef MSG_RESUMING #ifndef MSG_RESUMING
#define MSG_RESUMING _UxGT("Resuming print") #define MSG_RESUMING _UxGT("Resuming print")
#endif #endif
@ -540,11 +703,8 @@
#ifndef MSG_INFO_PROTOCOL #ifndef MSG_INFO_PROTOCOL
#define MSG_INFO_PROTOCOL _UxGT("Protocol") #define MSG_INFO_PROTOCOL _UxGT("Protocol")
#endif #endif
#ifndef MSG_LIGHTS_ON #ifndef MSG_CASE_LIGHT
#define MSG_LIGHTS_ON _UxGT("Case light on") #define MSG_CASE_LIGHT _UxGT("Case light")
#endif
#ifndef MSG_LIGHTS_OFF
#define MSG_LIGHTS_OFF _UxGT("Case light off")
#endif #endif
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
@ -590,7 +750,6 @@
#ifndef MSG_INFO_PSU #ifndef MSG_INFO_PSU
#define MSG_INFO_PSU _UxGT("Power Supply") #define MSG_INFO_PSU _UxGT("Power Supply")
#endif #endif
#ifndef MSG_DRIVE_STRENGTH #ifndef MSG_DRIVE_STRENGTH
#define MSG_DRIVE_STRENGTH _UxGT("Drive Strength") #define MSG_DRIVE_STRENGTH _UxGT("Drive Strength")
#endif #endif
@ -601,10 +760,10 @@
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write") #define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_HEADER #ifndef MSG_FILAMENT_CHANGE_HEADER
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("CHANGE FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_OPTION_HEADER #ifndef MSG_FILAMENT_CHANGE_OPTION_HEADER
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("CHANGE OPTIONS:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_OPTION_EXTRUDE #ifndef MSG_FILAMENT_CHANGE_OPTION_EXTRUDE
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrude more") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrude more")

@ -50,7 +50,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Iniciar (Presione)") #define MSG_LEVEL_BED_WAITING _UxGT("Iniciar (Presione)")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Siguiente punto") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Siguiente punto")
#define MSG_LEVEL_BED_DONE _UxGT("Nivelacion lista!") #define MSG_LEVEL_BED_DONE _UxGT("Nivelacion lista!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancelar")
#define MSG_SET_HOME_OFFSETS _UxGT("Ajustar desfases") #define MSG_SET_HOME_OFFSETS _UxGT("Ajustar desfases")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Desfase aplicado") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Desfase aplicado")
#define MSG_SET_ORIGIN _UxGT("Establecer origen") #define MSG_SET_ORIGIN _UxGT("Establecer origen")
@ -72,6 +71,7 @@
#define MSG_EXTRUDE _UxGT("Extruir") #define MSG_EXTRUDE _UxGT("Extruir")
#define MSG_RETRACT _UxGT("Retraer") #define MSG_RETRACT _UxGT("Retraer")
#define MSG_MOVE_AXIS _UxGT("Mover ejes") #define MSG_MOVE_AXIS _UxGT("Mover ejes")
#define MSG_BED_LEVELING _UxGT("Nivelar plataforma")
#define MSG_LEVEL_BED _UxGT("Nivelar plataforma") #define MSG_LEVEL_BED _UxGT("Nivelar plataforma")
#define MSG_MOVING _UxGT("Moviendo...") #define MSG_MOVING _UxGT("Moviendo...")
#define MSG_FREE_XY _UxGT("Libre XY") #define MSG_FREE_XY _UxGT("Libre XY")
@ -101,6 +101,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Seleccionar") #define MSG_SELECT _UxGT("Seleccionar")
#define MSG_ACC _UxGT("Aceleracion") #define MSG_ACC _UxGT("Aceleracion")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -108,9 +109,11 @@
#define MSG_VMAX _UxGT("Vmax") #define MSG_VMAX _UxGT("Vmax")
#define MSG_VMIN _UxGT("Vmin") #define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("Vel. viaje min") #define MSG_VTRAV_MIN _UxGT("Vel. viaje min")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Acel. max") #define MSG_AMAX _UxGT("Acel. max")
#define MSG_A_RETRACT _UxGT("Acel. retrac.") #define MSG_A_RETRACT _UxGT("Acel. retrac.")
#define MSG_A_TRAVEL _UxGT("Acel. Viaje") #define MSG_A_TRAVEL _UxGT("Acel. Viaje")
#define MSG_STEPS_PER_MM _UxGT("Pasos/mm")
#define MSG_XSTEPS _UxGT("X pasos/mm") #define MSG_XSTEPS _UxGT("X pasos/mm")
#define MSG_YSTEPS _UxGT("Y pasos/mm") #define MSG_YSTEPS _UxGT("Y pasos/mm")
#define MSG_ZSTEPS _UxGT("Z pasos/mm") #define MSG_ZSTEPS _UxGT("Z pasos/mm")
@ -161,7 +164,7 @@
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Auto-Prueba") #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Auto-Prueba")
#define MSG_BLTOUCH_RESET _UxGT("Reiniciar BLTouch") #define MSG_BLTOUCH_RESET _UxGT("Reiniciar BLTouch")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("first") #define MSG_FIRST _UxGT("inic.")
#define MSG_ZPROBE_ZOFFSET _UxGT("Desfase Z") #define MSG_ZPROBE_ZOFFSET _UxGT("Desfase Z")
#define MSG_BABYSTEP_X _UxGT("Micropaso X") #define MSG_BABYSTEP_X _UxGT("Micropaso X")
#define MSG_BABYSTEP_Y _UxGT("Micropaso Y") #define MSG_BABYSTEP_Y _UxGT("Micropaso Y")
@ -169,7 +172,7 @@
#define MSG_ENDSTOP_ABORT _UxGT("Cancelado - Endstop") #define MSG_ENDSTOP_ABORT _UxGT("Cancelado - Endstop")
#define MSG_HEATING_FAILED_LCD _UxGT("Error: al calentar") #define MSG_HEATING_FAILED_LCD _UxGT("Error: al calentar")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Error: temperatura") #define MSG_ERR_REDUNDANT_TEMP _UxGT("Error: temperatura")
#define MSG_THERMAL_RUNAWAY _UxGT("Error de temperatura") #define MSG_THERMAL_RUNAWAY _UxGT("Error: temperatura")
#define MSG_ERR_MAXTEMP _UxGT("Error: Temp Maxima") #define MSG_ERR_MAXTEMP _UxGT("Error: Temp Maxima")
#define MSG_ERR_MINTEMP _UxGT("Error: Temp Minima") #define MSG_ERR_MINTEMP _UxGT("Error: Temp Minima")
#define MSG_ERR_MAXTEMP_BED _UxGT("Error: Temp Max Plat") #define MSG_ERR_MAXTEMP_BED _UxGT("Error: Temp Max Plat")
@ -199,8 +202,8 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extrusores") #define MSG_INFO_EXTRUDERS _UxGT("Extrusores")
#define MSG_INFO_BAUDRATE _UxGT("Baudios") #define MSG_INFO_BAUDRATE _UxGT("Baudios")
#define MSG_INFO_PROTOCOL _UxGT("Protocolo") #define MSG_INFO_PROTOCOL _UxGT("Protocolo")
#define MSG_LIGHTS_ON _UxGT("Luz cabina ON") #define MSG_CASE_LIGHT _UxGT("Luz cabina")
#define MSG_LIGHTS_OFF _UxGT("Luz cabina OFF")
#if LCD_WIDTH > 19 #if LCD_WIDTH > 19
#define MSG_INFO_PRINT_COUNT _UxGT("Conteo de impresion") #define MSG_INFO_PRINT_COUNT _UxGT("Conteo de impresion")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completadas") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Completadas")
@ -214,6 +217,7 @@
#define MSG_INFO_PRINT_LONGEST _UxGT("Mas larga") #define MSG_INFO_PRINT_LONGEST _UxGT("Mas larga")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Extrusion") #define MSG_INFO_PRINT_FILAMENT _UxGT("Extrusion")
#endif #endif
#define MSG_INFO_MIN_TEMP _UxGT("Temperatura minima") #define MSG_INFO_MIN_TEMP _UxGT("Temperatura minima")
#define MSG_INFO_MAX_TEMP _UxGT("Temperatura maxima") #define MSG_INFO_MAX_TEMP _UxGT("Temperatura maxima")
#define MSG_INFO_PSU _UxGT("Fuente de poder") #define MSG_INFO_PSU _UxGT("Fuente de poder")
@ -221,8 +225,8 @@
#define MSG_DAC_PERCENT _UxGT("Driver %") #define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Escribe DAC EEPROM") #define MSG_DAC_EEPROM_WRITE _UxGT("Escribe DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("Cambiar Filamento") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("IMPR. PAUSADA")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Opciones de cambio:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("OPC. REINICIO:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruir mas") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruir mas")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Resumir imp.") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Resumir imp.")
@ -254,6 +258,8 @@
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Esperando imp.") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Esperando imp.")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("para resumir") #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("para resumir")
#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Oprima boton para") #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Oprima boton para")
#define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("Calentar la boquilla")
#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Calentando boquilla") #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Calentando boquilla")
#define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Espere por favor")
#endif // LANGUAGE_ES_H #endif // LANGUAGE_ES_H

@ -33,35 +33,48 @@
#define DISPLAY_CHARSET_ISO10646_1 #define DISPLAY_CHARSET_ISO10646_1
#define WELCOME_MSG MACHINE_NAME _UxGT(" prest.") #define WELCOME_MSG MACHINE_NAME _UxGT(" prest.")
#define MSG_BACK _UxGT("Atzera")
#define MSG_SD_INSERTED _UxGT("Txartela sartuta") #define MSG_SD_INSERTED _UxGT("Txartela sartuta")
#define MSG_SD_REMOVED _UxGT("Txartela kenduta") #define MSG_SD_REMOVED _UxGT("Txartela kenduta")
#define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters
#define MSG_MAIN _UxGT("Menu nagusia") #define MSG_MAIN _UxGT("Menu nagusia")
#define MSG_AUTOSTART _UxGT("Auto hasiera") #define MSG_AUTOSTART _UxGT("Auto hasiera")
#define MSG_DISABLE_STEPPERS _UxGT("Itzali motoreak") #define MSG_DISABLE_STEPPERS _UxGT("Itzali motoreak")
#define MSG_DEBUG_MENU _UxGT("Arazketa Menua")
#define MSG_PROGRESS_BAR_TEST _UxGT("Prog. Barra Proba")
#define MSG_AUTO_HOME _UxGT("Hasierara joan") #define MSG_AUTO_HOME _UxGT("Hasierara joan")
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ") #define MSG_AUTO_HOME_X _UxGT("X jatorria")
#define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin") #define MSG_AUTO_HOME_Y _UxGT("Y jatorria")
#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!") #define MSG_AUTO_HOME_Z _UxGT("Z jatorria")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancel") #define MSG_LEVEL_BED_HOMING _UxGT("XYZ hasieraratzen")
#define MSG_SET_HOME_OFFSETS _UxGT("Set home offsets") #define MSG_LEVEL_BED_WAITING _UxGT("Klik egin hasteko")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Hurrengo Puntua")
#define MSG_LEVEL_BED_DONE _UxGT("Berdintzea eginda")
#define MSG_SET_HOME_OFFSETS _UxGT("Etxe. offset eza.")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsetak ezarrita")
#define MSG_SET_ORIGIN _UxGT("Hasiera ipini") #define MSG_SET_ORIGIN _UxGT("Hasiera ipini")
#define MSG_PREHEAT_1 _UxGT("Aurreberotu PLA") #define MSG_PREHEAT_1 _UxGT("Berotu PLA")
#define MSG_PREHEAT_1_N _UxGT("Aurreberotu PLA ") #define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ")
#define MSG_PREHEAT_1_ALL _UxGT("Berotu PLA Guztia") #define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" Guztia")
#define MSG_PREHEAT_1_BEDONLY _UxGT("Berotu PLA Ohea") #define MSG_PREHEAT_1_END MSG_PREHEAT_1 _UxGT(" Amaia")
#define MSG_PREHEAT_1_SETTINGS _UxGT("Berotu PLA Konfig") #define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 _UxGT(" Ohea")
#define MSG_PREHEAT_2 _UxGT("Aurreberotu ABS") #define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 _UxGT(" konf.")
#define MSG_PREHEAT_2_N _UxGT("Aurreberotu ABS ") #define MSG_PREHEAT_2 _UxGT("Berotu ABS")
#define MSG_PREHEAT_2_ALL _UxGT("Berotu ABS Guztia") #define MSG_PREHEAT_2_N MSG_PREHEAT_1 _UxGT(" ")
#define MSG_PREHEAT_2_BEDONLY _UxGT("Berotu ABS Ohea") #define MSG_PREHEAT_2_ALL MSG_PREHEAT_1 _UxGT(" Guztia")
#define MSG_PREHEAT_2_SETTINGS _UxGT("Berotu ABS Konfig") #define MSG_PREHEAT_2_END MSG_PREHEAT_2 _UxGT(" Amaia")
#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_1 _UxGT(" Ohea")
#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_1 _UxGT(" konf.")
#define MSG_COOLDOWN _UxGT("Hoztu") #define MSG_COOLDOWN _UxGT("Hoztu")
#define MSG_SWITCH_PS_ON _UxGT("Energia piztu") #define MSG_SWITCH_PS_ON _UxGT("Energia piztu")
#define MSG_SWITCH_PS_OFF _UxGT("Energia itzali") #define MSG_SWITCH_PS_OFF _UxGT("Energia itzali")
#define MSG_EXTRUDE _UxGT("Estruitu") #define MSG_EXTRUDE _UxGT("Estruitu")
#define MSG_RETRACT _UxGT("Atzera eragin") #define MSG_RETRACT _UxGT("Atzera eragin")
#define MSG_MOVE_AXIS _UxGT("Ardatzak mugitu") #define MSG_MOVE_AXIS _UxGT("Ardatzak mugitu")
#define MSG_BED_LEVELING _UxGT("Ohea Berdindu")
#define MSG_LEVEL_BED _UxGT("Ohea Berdindu")
#define MSG_MOVING _UxGT("Mugitzen...")
#define MSG_FREE_XY _UxGT("Askatu XY")
#define MSG_MOVE_X _UxGT("Mugitu X") #define MSG_MOVE_X _UxGT("Mugitu X")
#define MSG_MOVE_Y _UxGT("Mugitu Y") #define MSG_MOVE_Y _UxGT("Mugitu Y")
#define MSG_MOVE_Z _UxGT("Mugitu Z") #define MSG_MOVE_Z _UxGT("Mugitu Z")
@ -70,14 +83,15 @@
#define MSG_MOVE_1MM _UxGT("Mugitu 1mm") #define MSG_MOVE_1MM _UxGT("Mugitu 1mm")
#define MSG_MOVE_10MM _UxGT("Mugitu 10mm") #define MSG_MOVE_10MM _UxGT("Mugitu 10mm")
#define MSG_SPEED _UxGT("Abiadura") #define MSG_SPEED _UxGT("Abiadura")
#define MSG_BED_Z _UxGT("Z Ohea")
#define MSG_NOZZLE _UxGT("Pita") #define MSG_NOZZLE _UxGT("Pita")
#define MSG_BED _UxGT("Ohea") #define MSG_BED _UxGT("Ohea")
#define MSG_FAN_SPEED _UxGT("Haizagailua") #define MSG_FAN_SPEED _UxGT("Haizagailu abiada")
#define MSG_FLOW _UxGT("Fluxua") #define MSG_FLOW _UxGT("Fluxua")
#define MSG_CONTROL _UxGT("Kontrola") #define MSG_CONTROL _UxGT("Kontrola")
#define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min") #define MSG_MIN _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" Min")
#define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max") #define MSG_MAX _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" Max")
#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Faktorea") #define MSG_FACTOR _UxGT(" ") LCD_STR_THERMOMETER _UxGT(" Fakt")
#define MSG_AUTOTEMP _UxGT("Auto tenperatura") #define MSG_AUTOTEMP _UxGT("Auto tenperatura")
#define MSG_ON _UxGT("On ") #define MSG_ON _UxGT("On ")
#define MSG_OFF _UxGT("Off") #define MSG_OFF _UxGT("Off")
@ -85,16 +99,21 @@
#define MSG_PID_I _UxGT("PID-I") #define MSG_PID_I _UxGT("PID-I")
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Aukeratu")
#define MSG_ACC _UxGT("Azelerazioa") #define MSG_ACC _UxGT("Azelerazioa")
#define MSG_JERK _UxGT("Astindua")
#define MSG_VX_JERK _UxGT("Vx-astindua") #define MSG_VX_JERK _UxGT("Vx-astindua")
#define MSG_VY_JERK _UxGT("Vy-astindua") #define MSG_VY_JERK _UxGT("Vy-astindua")
#define MSG_VZ_JERK _UxGT("Vz-astindua") #define MSG_VZ_JERK _UxGT("Vz-astindua")
#define MSG_VE_JERK _UxGT("Ve-astindua") #define MSG_VE_JERK _UxGT("Ve-astindua")
#define MSG_VMAX _UxGT("Vmax ") #define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin") #define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("VTrav min") #define MSG_VTRAV_MIN _UxGT("VBidaia min")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retrakt") #define MSG_A_RETRACT _UxGT("A-retrakt")
#define MSG_A_TRAVEL _UxGT("A-bidaia")
#define MSG_STEPS_PER_MM _UxGT("Pausoak/mm")
#define MSG_XSTEPS _UxGT("X pausoak/mm") #define MSG_XSTEPS _UxGT("X pausoak/mm")
#define MSG_YSTEPS _UxGT("Y pausoak/mm") #define MSG_YSTEPS _UxGT("Y pausoak/mm")
#define MSG_ZSTEPS _UxGT("Z pausoak/mm") #define MSG_ZSTEPS _UxGT("Z pausoak/mm")
@ -106,9 +125,10 @@
#define MSG_E5STEPS _UxGT("E5 pausoak/mm") #define MSG_E5STEPS _UxGT("E5 pausoak/mm")
#define MSG_TEMPERATURE _UxGT("Tenperatura") #define MSG_TEMPERATURE _UxGT("Tenperatura")
#define MSG_MOTION _UxGT("Mugimendua") #define MSG_MOTION _UxGT("Mugimendua")
#define MSG_FILAMENT _UxGT("Filament") #define MSG_FILAMENT _UxGT("Harizpia")
#define MSG_VOLUMETRIC_ENABLED _UxGT("E in mm3") #define MSG_VOLUMETRIC_ENABLED _UxGT("E mm3-tan")
#define MSG_FILAMENT_DIAM _UxGT("Fil. Dia.") #define MSG_FILAMENT_DIAM _UxGT("Hariz. Dia.")
#define MSG_ADVANCE_K _UxGT("K Aurrerapena")
#define MSG_CONTRAST _UxGT("LCD kontrastea") #define MSG_CONTRAST _UxGT("LCD kontrastea")
#define MSG_STORE_EEPROM _UxGT("Gorde memoria") #define MSG_STORE_EEPROM _UxGT("Gorde memoria")
#define MSG_LOAD_EEPROM _UxGT("Kargatu memoria") #define MSG_LOAD_EEPROM _UxGT("Kargatu memoria")
@ -121,37 +141,95 @@
#define MSG_RESUME_PRINT _UxGT("Jarraitu inprima.") #define MSG_RESUME_PRINT _UxGT("Jarraitu inprima.")
#define MSG_STOP_PRINT _UxGT("Gelditu inprima.") #define MSG_STOP_PRINT _UxGT("Gelditu inprima.")
#define MSG_CARD_MENU _UxGT("SD-tik inprimatu") #define MSG_CARD_MENU _UxGT("SD-tik inprimatu")
#define MSG_NO_CARD _UxGT("Ez dago txartelik") #define MSG_NO_CARD _UxGT("Ez dago SD-rik")
#define MSG_DWELL _UxGT("Lo egin...") #define MSG_DWELL _UxGT("Lo egin...")
#define MSG_USERWAIT _UxGT("Aginduak zain...") #define MSG_USERWAIT _UxGT("Aginduak zain...")
#define MSG_RESUMING _UxGT("Jarraitzen inpri.") #define MSG_RESUMING _UxGT("Jarraitzen inpri.")
#define MSG_PRINT_ABORTED _UxGT("Print aborted") #define MSG_PRINT_ABORTED _UxGT("Inprim. deusezta.")
#define MSG_NO_MOVE _UxGT("Mugimendu gabe") #define MSG_NO_MOVE _UxGT("Mugimendu gabe.")
#define MSG_KILLED _UxGT("LARRIALDI GELDIA") #define MSG_KILLED _UxGT("AKABATUTA. ")
#define MSG_STOPPED _UxGT("GELDITUTA. ") #define MSG_STOPPED _UxGT("GELDITUTA. ")
#define MSG_CONTROL_RETRACT _UxGT("Atzera egin mm") #define MSG_CONTROL_RETRACT _UxGT("Atzera egin mm")
#define MSG_CONTROL_RETRACT_SWAP _UxGT("Swap Atzera egin mm") #define MSG_CONTROL_RETRACT_SWAP _UxGT("Swap Atzera mm")
#define MSG_CONTROL_RETRACTF _UxGT("Atzera egin V") #define MSG_CONTROL_RETRACTF _UxGT("Atzera egin V")
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Igo mm") #define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Igo mm")
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Atzera egin mm") #define MSG_CONTROL_RETRACT_RECOVER _UxGT("Atzera egin mm")
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Swap Atzera egin mm") #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Swap Atzera mm")
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Atzera egin V") #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Atzera egin V")
#define MSG_AUTORETRACT _UxGT("Atzera egin") #define MSG_AUTORETRACT _UxGT("Atzera egin")
#define MSG_FILAMENTCHANGE _UxGT("Aldatu filament.") #define MSG_FILAMENTCHANGE _UxGT("Aldatu harizpia")
#define MSG_INIT_SDCARD _UxGT("Hasieratu txartela") #define MSG_INIT_SDCARD _UxGT("Hasieratu SD-a")
#define MSG_CNG_SDCARD _UxGT("Aldatu txartela") #define MSG_CNG_SDCARD _UxGT("Aldatu txartela")
#define MSG_ZPROBE_OUT _UxGT("Z ohe hasiera") #define MSG_ZPROBE_OUT _UxGT("Z zunda kanpora")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch AutoProba")
#define MSG_FIRST _UxGT("first") #define MSG_BLTOUCH_RESET _UxGT("BLTouch berrabia.")
#define MSG_ZPROBE_ZOFFSET _UxGT("Z konpentsatu") #define MSG_HOME _UxGT("Etxera") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_BABYSTEP_X _UxGT("Babystep X") #define MSG_FIRST _UxGT("lehenengo")
#define MSG_BABYSTEP_Y _UxGT("Babystep Y") #define MSG_ZPROBE_ZOFFSET _UxGT("Z Konpentsatu")
#define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_BABYSTEP_X _UxGT("Mikro-urratsa X")
#define MSG_ENDSTOP_ABORT _UxGT("Endstop deuseztat") #define MSG_BABYSTEP_Y _UxGT("Mikro-urratsa Y")
#define MSG_DELTA_CALIBRATE _UxGT("Delta Calibration") #define MSG_BABYSTEP_Z _UxGT("Mikro-urratsa Z")
#define MSG_DELTA_CALIBRATE_X _UxGT("Calibrate X") #define MSG_ENDSTOP_ABORT _UxGT("Endstop deusezta.")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrate Y") #define MSG_HEATING_FAILED_LCD _UxGT("Err: Beroketa")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Calibrate Z") #define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: Tenperatura")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Calibrate Center") #define MSG_THERMAL_RUNAWAY _UxGT("TENP. KONTROL EZA")
#define MSG_ERR_MAXTEMP _UxGT("Err: Tenp Maximoa")
#define MSG_ERR_MINTEMP _UxGT("Err: Tenp Minimoa")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err: Ohe Tenp Max")
#define MSG_ERR_MINTEMP_BED _UxGT("Err: Ohe Tenp Min")
#define MSG_ERR_Z_HOMING _UxGT("G28 Z Debekatua")
#define MSG_HALTED _UxGT("INPRIMA. GELDIRIK")
#define MSG_PLEASE_RESET _UxGT("Berrabia. Mesedez")
#define MSG_SHORT_DAY _UxGT("d") // One character only
#define MSG_SHORT_HOUR _UxGT("h") // One character only
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("Berotzen...")
#define MSG_HEATING_COMPLETE _UxGT("Berotzea prest.")
#define MSG_BED_HEATING _UxGT("Ohea Berotzen.")
#define MSG_BED_DONE _UxGT("Ohea Berotuta.")
#define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibraketa")
#define MSG_DELTA_CALIBRATE_X _UxGT("Kalibratu X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibratu Y")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Kalibratu Z")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Kalibratu Zentrua")
#define MSG_DELTA_AUTO_CALIBRATE _UxGT("Auto Kalibraketa")
#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Delta Alt. Ezar.")
#define MSG_INFO_MENU _UxGT("Inprimagailu Inf.")
#define MSG_INFO_PRINTER_MENU _UxGT("Inprimagailu Inf.")
#define MSG_INFO_STATS_MENU _UxGT("Inprima. estatis.")
#define MSG_INFO_BOARD_MENU _UxGT("Txartelaren Info.")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Termistoreak")
#define MSG_INFO_EXTRUDERS _UxGT("Estrusoreak")
#define MSG_INFO_BAUDRATE _UxGT("Baudioak")
#define MSG_INFO_PROTOCOL _UxGT("Protokoloa")
#define MSG_CASE_LIGHT _UxGT("Kabina Argia")
#if LCD_WIDTH > 19
#define MSG_INFO_PRINT_COUNT _UxGT("Inprim. Zenbaketa")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Burututa")
#define MSG_INFO_PRINT_TIME _UxGT("Inprim. denbora")
#define MSG_INFO_PRINT_LONGEST _UxGT("Imprimatze luzeena")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Estruituta guztira")
#else
#define MSG_INFO_PRINT_COUNT _UxGT("Inprimatze")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Burututa")
#define MSG_INFO_PRINT_TIME _UxGT("Guztira")
#define MSG_INFO_PRINT_LONGEST _UxGT("Luzeena")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Estrusio")
#endif
#define MSG_INFO_MIN_TEMP _UxGT("Tenp. Minimoa")
#define MSG_INFO_MAX_TEMP _UxGT("Tenp. Maximoa")
#define MSG_INFO_PSU _UxGT("Elikadura Iturria")
#define MSG_DRIVE_STRENGTH _UxGT("Driver Potentzia")
#define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Idatzi DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("HARIZPIA ALDATU")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ALDAKETA AUKERAK:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Gehiago estruitu")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Inprima. jarraitu")
#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Tenp Minimoa ")
#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Pita: ")
#endif // LANGUAGE_EU_H #endif // LANGUAGE_EU_H

@ -43,7 +43,6 @@
#define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ") #define MSG_LEVEL_BED_HOMING _UxGT("Homing XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin") #define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin")
#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!") #define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancel")
#define MSG_SET_HOME_OFFSETS _UxGT("Set home offsets") #define MSG_SET_HOME_OFFSETS _UxGT("Set home offsets")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied")
#define MSG_SET_ORIGIN _UxGT("Aseta origo") #define MSG_SET_ORIGIN _UxGT("Aseta origo")
@ -87,6 +86,7 @@
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_ACC _UxGT("Kiihtyv") #define MSG_ACC _UxGT("Kiihtyv")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -94,8 +94,10 @@
#define MSG_VMAX _UxGT("Vmax ") #define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin") #define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("VLiike min") #define MSG_VTRAV_MIN _UxGT("VLiike min")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-peruuta") #define MSG_A_RETRACT _UxGT("A-peruuta")
#define MSG_STEPS_PER_MM _UxGT("Steps/mm")
#define MSG_XSTEPS _UxGT("Xsteps/mm") #define MSG_XSTEPS _UxGT("Xsteps/mm")
#define MSG_YSTEPS _UxGT("Ysteps/mm") #define MSG_YSTEPS _UxGT("Ysteps/mm")
#define MSG_ZSTEPS _UxGT("Zsteps/mm") #define MSG_ZSTEPS _UxGT("Zsteps/mm")

@ -51,7 +51,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Clic pour commencer") #define MSG_LEVEL_BED_WAITING _UxGT("Clic pour commencer")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Point suivant") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Point suivant")
#define MSG_LEVEL_BED_DONE _UxGT("Mise à niveau OK!") #define MSG_LEVEL_BED_DONE _UxGT("Mise à niveau OK!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Annuler")
#define MSG_SET_HOME_OFFSETS _UxGT("Regl. décal. origine") #define MSG_SET_HOME_OFFSETS _UxGT("Regl. décal. origine")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Décalages appliqués") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Décalages appliqués")
#define MSG_SET_ORIGIN _UxGT("Régler origine") #define MSG_SET_ORIGIN _UxGT("Régler origine")
@ -73,6 +72,7 @@
#define MSG_EXTRUDE _UxGT("Éxtrusion") #define MSG_EXTRUDE _UxGT("Éxtrusion")
#define MSG_RETRACT _UxGT("Rétraction") #define MSG_RETRACT _UxGT("Rétraction")
#define MSG_MOVE_AXIS _UxGT("Déplacer un axe") #define MSG_MOVE_AXIS _UxGT("Déplacer un axe")
#define MSG_BED_LEVELING _UxGT("Règl. Niv. lit")
#define MSG_LEVEL_BED _UxGT("Règl. Niv. lit") #define MSG_LEVEL_BED _UxGT("Règl. Niv. lit")
#define MSG_MOVING _UxGT("Déplacement...") #define MSG_MOVING _UxGT("Déplacement...")
#define MSG_FREE_XY _UxGT("Débloquer XY") #define MSG_FREE_XY _UxGT("Débloquer XY")
@ -102,6 +102,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Sélectionner") #define MSG_SELECT _UxGT("Sélectionner")
#define MSG_ACC _UxGT("Accélération") #define MSG_ACC _UxGT("Accélération")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -112,6 +113,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retract") #define MSG_A_RETRACT _UxGT("A-retract")
#define MSG_A_TRAVEL _UxGT("A-Dépl.") #define MSG_A_TRAVEL _UxGT("A-Dépl.")
#define MSG_STEPS_PER_MM _UxGT("Pas/mm")
#define MSG_XSTEPS _UxGT("Xpas/mm") #define MSG_XSTEPS _UxGT("Xpas/mm")
#define MSG_YSTEPS _UxGT("Ypas/mm") #define MSG_YSTEPS _UxGT("Ypas/mm")
#define MSG_ZSTEPS _UxGT("Zpas/mm") #define MSG_ZSTEPS _UxGT("Zpas/mm")
@ -121,7 +123,7 @@
#define MSG_E3STEPS _UxGT("E3pas/mm") #define MSG_E3STEPS _UxGT("E3pas/mm")
#define MSG_E4STEPS _UxGT("E4pas/mm") #define MSG_E4STEPS _UxGT("E4pas/mm")
#define MSG_E5STEPS _UxGT("E5pas/mm") #define MSG_E5STEPS _UxGT("E5pas/mm")
#define MSG_TEMPERATURE _UxGT("Tempzrature") #define MSG_TEMPERATURE _UxGT("Température")
#define MSG_MOTION _UxGT("Mouvement") #define MSG_MOTION _UxGT("Mouvement")
#define MSG_FILAMENT _UxGT("Filament") #define MSG_FILAMENT _UxGT("Filament")
#define MSG_VOLUMETRIC_ENABLED _UxGT("E en mm3") #define MSG_VOLUMETRIC_ENABLED _UxGT("E en mm3")
@ -205,8 +207,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extrudeurs") #define MSG_INFO_EXTRUDERS _UxGT("Extrudeurs")
#define MSG_INFO_BAUDRATE _UxGT("Baud") #define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_PROTOCOL _UxGT("Protocole") #define MSG_INFO_PROTOCOL _UxGT("Protocole")
#define MSG_LIGHTS_ON _UxGT("Allumer boîtier") #define MSG_CASE_LIGHT _UxGT("Lumière")
#define MSG_LIGHTS_OFF _UxGT("Eteindre boîtier")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Nbre impressions") #define MSG_INFO_PRINT_COUNT _UxGT("Nbre impressions")
@ -229,8 +230,8 @@
#define MSG_DAC_PERCENT _UxGT("Driver %") #define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM sauv.") #define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM sauv.")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("CHANGER FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("CHANGER OPTIONS:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("+ extrusion") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("+ extrusion")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Reprendre impr.") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Reprendre impr.")
#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("La temp. minimum est ") #define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("La temp. minimum est ")

@ -48,7 +48,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Prema pulsador") #define MSG_LEVEL_BED_WAITING _UxGT("Prema pulsador")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Seguinte punto") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Seguinte punto")
#define MSG_LEVEL_BED_DONE _UxGT("Nivelado feito") #define MSG_LEVEL_BED_DONE _UxGT("Nivelado feito")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancelar")
#define MSG_SET_HOME_OFFSETS _UxGT("Offsets na orixe") #define MSG_SET_HOME_OFFSETS _UxGT("Offsets na orixe")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets fixados") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets fixados")
#define MSG_SET_ORIGIN _UxGT("Fixar orixe") #define MSG_SET_ORIGIN _UxGT("Fixar orixe")
@ -68,6 +67,7 @@
#define MSG_EXTRUDE _UxGT("Extrudir") #define MSG_EXTRUDE _UxGT("Extrudir")
#define MSG_RETRACT _UxGT("Retraer") #define MSG_RETRACT _UxGT("Retraer")
#define MSG_MOVE_AXIS _UxGT("Mover eixe") #define MSG_MOVE_AXIS _UxGT("Mover eixe")
#define MSG_BED_LEVELING _UxGT("Nivelar cama")
#define MSG_LEVEL_BED _UxGT("Nivelar cama") #define MSG_LEVEL_BED _UxGT("Nivelar cama")
#define MSG_MOVE_X _UxGT("Mover X") #define MSG_MOVE_X _UxGT("Mover X")
#define MSG_MOVE_Y _UxGT("Mover Y") #define MSG_MOVE_Y _UxGT("Mover Y")
@ -95,6 +95,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Escolla") #define MSG_SELECT _UxGT("Escolla")
#define MSG_ACC _UxGT("Acel") #define MSG_ACC _UxGT("Acel")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -105,6 +106,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retract") #define MSG_A_RETRACT _UxGT("A-retract")
#define MSG_A_TRAVEL _UxGT("A-travel") #define MSG_A_TRAVEL _UxGT("A-travel")
#define MSG_STEPS_PER_MM _UxGT("Pasos/mm")
#define MSG_XSTEPS _UxGT("Xpasos/mm") #define MSG_XSTEPS _UxGT("Xpasos/mm")
#define MSG_YSTEPS _UxGT("Ypasos/mm") #define MSG_YSTEPS _UxGT("Ypasos/mm")
#define MSG_ZSTEPS _UxGT("Zpasos/mm") #define MSG_ZSTEPS _UxGT("Zpasos/mm")
@ -190,8 +192,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extrusores") #define MSG_INFO_EXTRUDERS _UxGT("Extrusores")
#define MSG_INFO_BAUDRATE _UxGT("Baudios") #define MSG_INFO_BAUDRATE _UxGT("Baudios")
#define MSG_INFO_PROTOCOL _UxGT("Protocolo") #define MSG_INFO_PROTOCOL _UxGT("Protocolo")
#define MSG_LIGHTS_ON _UxGT("Acender a luz") #define MSG_CASE_LIGHT _UxGT("Luz")
#define MSG_LIGHTS_OFF _UxGT("Apagar a luz")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Total traballos") #define MSG_INFO_PRINT_COUNT _UxGT("Total traballos")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Total completos") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Total completos")
@ -212,8 +213,8 @@
#define MSG_DAC_PERCENT _UxGT("Motor %") #define MSG_DAC_PERCENT _UxGT("Motor %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Garda DAC EEPROM") #define MSG_DAC_EEPROM_WRITE _UxGT("Garda DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("TROCO FILAMENTO") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("OPCIONS TROCO:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruir mais") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extruir mais")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Segue traballo") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Segue traballo")

@ -47,7 +47,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Klikni za početak") #define MSG_LEVEL_BED_WAITING _UxGT("Klikni za početak")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Sljedeća točka") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Sljedeća točka")
#define MSG_LEVEL_BED_DONE _UxGT("Niveliranje gotovo!") #define MSG_LEVEL_BED_DONE _UxGT("Niveliranje gotovo!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Otkaži")
#define MSG_SET_HOME_OFFSETS _UxGT("Postavi home offsete") #define MSG_SET_HOME_OFFSETS _UxGT("Postavi home offsete")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets postavljeni") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets postavljeni")
#define MSG_SET_ORIGIN _UxGT("Postavi ishodište") #define MSG_SET_ORIGIN _UxGT("Postavi ishodište")
@ -67,6 +66,7 @@
#define MSG_EXTRUDE _UxGT("Extrude") #define MSG_EXTRUDE _UxGT("Extrude")
#define MSG_RETRACT _UxGT("Retract") #define MSG_RETRACT _UxGT("Retract")
#define MSG_MOVE_AXIS _UxGT("Miči os") #define MSG_MOVE_AXIS _UxGT("Miči os")
#define MSG_BED_LEVELING _UxGT("Niveliraj bed")
#define MSG_LEVEL_BED _UxGT("Niveliraj bed") #define MSG_LEVEL_BED _UxGT("Niveliraj bed")
#define MSG_MOVE_X _UxGT("Miči X") #define MSG_MOVE_X _UxGT("Miči X")
#define MSG_MOVE_Y _UxGT("Miči Y") #define MSG_MOVE_Y _UxGT("Miči Y")
@ -94,6 +94,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Odaberi") #define MSG_SELECT _UxGT("Odaberi")
#define MSG_ACC _UxGT("Accel") #define MSG_ACC _UxGT("Accel")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -104,6 +105,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retract") #define MSG_A_RETRACT _UxGT("A-retract")
#define MSG_A_TRAVEL _UxGT("A-travel") #define MSG_A_TRAVEL _UxGT("A-travel")
#define MSG_STEPS_PER_MM _UxGT("Steps/mm")
#define MSG_XSTEPS _UxGT("Xsteps/mm") #define MSG_XSTEPS _UxGT("Xsteps/mm")
#define MSG_YSTEPS _UxGT("Ysteps/mm") #define MSG_YSTEPS _UxGT("Ysteps/mm")
#define MSG_ZSTEPS _UxGT("Zsteps/mm") #define MSG_ZSTEPS _UxGT("Zsteps/mm")
@ -189,8 +191,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Extruderi") #define MSG_INFO_EXTRUDERS _UxGT("Extruderi")
#define MSG_INFO_BAUDRATE _UxGT("Baud") #define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_PROTOCOL _UxGT("Protokol") #define MSG_INFO_PROTOCOL _UxGT("Protokol")
#define MSG_LIGHTS_ON _UxGT("Upali osvjetljenje") #define MSG_CASE_LIGHT _UxGT("Osvjetljenje")
#define MSG_LIGHTS_OFF _UxGT("Ugasi osvjetljenje")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Broj printova") #define MSG_INFO_PRINT_COUNT _UxGT("Broj printova")
@ -213,8 +214,8 @@
#define MSG_DAC_PERCENT _UxGT("Driver %") #define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write") #define MSG_DAC_EEPROM_WRITE _UxGT("DAC EEPROM Write")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("CHANGE FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("CHANGE OPTIONS:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrudiraj više") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrudiraj više")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Nastavi print") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Nastavi print")

@ -50,7 +50,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Premi per iniziare") #define MSG_LEVEL_BED_WAITING _UxGT("Premi per iniziare")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Punto successivo") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Punto successivo")
#define MSG_LEVEL_BED_DONE _UxGT("Livel. terminato!") #define MSG_LEVEL_BED_DONE _UxGT("Livel. terminato!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Annulla")
#define MSG_SET_HOME_OFFSETS _UxGT("Imp. offset home") #define MSG_SET_HOME_OFFSETS _UxGT("Imp. offset home")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offset applicato") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offset applicato")
#define MSG_SET_ORIGIN _UxGT("Imposta Origine") #define MSG_SET_ORIGIN _UxGT("Imposta Origine")
@ -72,6 +71,7 @@
#define MSG_EXTRUDE _UxGT("Estrudi") #define MSG_EXTRUDE _UxGT("Estrudi")
#define MSG_RETRACT _UxGT("Ritrai") #define MSG_RETRACT _UxGT("Ritrai")
#define MSG_MOVE_AXIS _UxGT("Muovi Asse") #define MSG_MOVE_AXIS _UxGT("Muovi Asse")
#define MSG_BED_LEVELING _UxGT("Livella piano")
#define MSG_LEVEL_BED _UxGT("Livella piano") #define MSG_LEVEL_BED _UxGT("Livella piano")
#define MSG_MOVING _UxGT("In movimento...") #define MSG_MOVING _UxGT("In movimento...")
#define MSG_FREE_XY _UxGT("XY liberi") #define MSG_FREE_XY _UxGT("XY liberi")
@ -109,6 +109,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Seleziona") #define MSG_SELECT _UxGT("Seleziona")
#define MSG_ACC _UxGT("Accel") #define MSG_ACC _UxGT("Accel")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -119,6 +120,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retract") #define MSG_A_RETRACT _UxGT("A-retract")
#define MSG_A_TRAVEL _UxGT("A-Spostamento") #define MSG_A_TRAVEL _UxGT("A-Spostamento")
#define MSG_STEPS_PER_MM _UxGT("Passi/mm")
#define MSG_XSTEPS _UxGT("Xpassi/mm") #define MSG_XSTEPS _UxGT("Xpassi/mm")
#define MSG_YSTEPS _UxGT("Ypassi/mm") #define MSG_YSTEPS _UxGT("Ypassi/mm")
#define MSG_ZSTEPS _UxGT("Zpassi/mm") #define MSG_ZSTEPS _UxGT("Zpassi/mm")
@ -207,8 +209,8 @@
#define MSG_INFO_EXTRUDERS _UxGT("Estrusori") #define MSG_INFO_EXTRUDERS _UxGT("Estrusori")
#define MSG_INFO_BAUDRATE _UxGT("Baud") #define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_PROTOCOL _UxGT("Protocollo") #define MSG_INFO_PROTOCOL _UxGT("Protocollo")
#define MSG_LIGHTS_ON _UxGT("Luci Case on") #define MSG_CASE_LIGHT _UxGT("Luci Case")
#define MSG_LIGHTS_OFF _UxGT("Luci Case off")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Contat. stampa") #define MSG_INFO_PRINT_COUNT _UxGT("Contat. stampa")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completati") #define MSG_INFO_COMPLETED_PRINTS _UxGT("Completati")
@ -238,8 +240,8 @@
#define MSG_DAC_PERCENT _UxGT("Driver %") #define MSG_DAC_PERCENT _UxGT("Driver %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Scrivi DAC EEPROM") #define MSG_DAC_EEPROM_WRITE _UxGT("Scrivi DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("CAMBIA FILAMENTO") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("CAMBIA OPZIONI:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Estrusione") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Estrusione")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Riprendi stampa") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Riprendi stampa")
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)

@ -53,7 +53,6 @@
#define MSG_LEVEL_BED_WAITING "\xda\xcd\xde\xd8\xdd\xb8\xde\xb6\xb2\xbc" // "レベリングカイシ" ("Click to Begin") #define MSG_LEVEL_BED_WAITING "\xda\xcd\xde\xd8\xdd\xb8\xde\xb6\xb2\xbc" // "レベリングカイシ" ("Click to Begin")
#define MSG_LEVEL_BED_NEXT_POINT "\xc2\xb7\xde\xc9\xbf\xb8\xc3\xb2\xc3\xdd\xcd" // "ツギノソクテイテンヘ" ("Next Point") #define MSG_LEVEL_BED_NEXT_POINT "\xc2\xb7\xde\xc9\xbf\xb8\xc3\xb2\xc3\xdd\xcd" // "ツギノソクテイテンヘ" ("Next Point")
#define MSG_LEVEL_BED_DONE "\xda\xcd\xde\xd8\xdd\xb8\xde\xb6\xdd\xd8\xae\xb3" // "レベリングカンリョウ" ("Leveling Done!") #define MSG_LEVEL_BED_DONE "\xda\xcd\xde\xd8\xdd\xb8\xde\xb6\xdd\xd8\xae\xb3" // "レベリングカンリョウ" ("Leveling Done!")
#define MSG_LEVEL_BED_CANCEL "\xc4\xd8\xd4\xd2" // "トリヤメ" ("Cancel")
#define MSG_SET_HOME_OFFSETS "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2" // "キジュンオフセットセッテイ" ("Set home offsets") #define MSG_SET_HOME_OFFSETS "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2" // "キジュンオフセットセッテイ" ("Set home offsets")
#define MSG_HOME_OFFSETS_APPLIED "\xb5\xcc\xbe\xaf\xc4\xb6\xde\xc3\xb7\xd6\xb3\xbb\xda\xcf\xbc\xc0" // "オフセットガテキヨウサレマシタ" ("Offsets applied") #define MSG_HOME_OFFSETS_APPLIED "\xb5\xcc\xbe\xaf\xc4\xb6\xde\xc3\xb7\xd6\xb3\xbb\xda\xcf\xbc\xc0" // "オフセットガテキヨウサレマシタ" ("Offsets applied")
#define MSG_SET_ORIGIN "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4" // "キジュンセット" ("Set origin") #define MSG_SET_ORIGIN "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4" // "キジュンセット" ("Set origin")
@ -73,6 +72,7 @@
#define MSG_EXTRUDE "\xb5\xbc\xc0\xde\xbc" // "オシダシ" ("Extrude") #define MSG_EXTRUDE "\xb5\xbc\xc0\xde\xbc" // "オシダシ" ("Extrude")
#define MSG_RETRACT "\xcb\xb7\xba\xd0\xbe\xaf\xc3\xb2" // "ヒキコミセッテイ" ("Retract") #define MSG_RETRACT "\xcb\xb7\xba\xd0\xbe\xaf\xc3\xb2" // "ヒキコミセッテイ" ("Retract")
#define MSG_MOVE_AXIS "\xbc\xde\xb8\xb2\xc4\xde\xb3" // "ジクイドウ" ("Move axis") #define MSG_MOVE_AXIS "\xbc\xde\xb8\xb2\xc4\xde\xb3" // "ジクイドウ" ("Move axis")
#define MSG_BED_LEVELING "\xcd\xde\xaf\xc4\xde\xda\xcd\xde\xd8\xdd\xb8\xde" // "ベッドレベリング" ("Bed Leveling")
#define MSG_LEVEL_BED "\xcd\xde\xaf\xc4\xde\xda\xcd\xde\xd8\xdd\xb8\xde" // "ベッドレベリング" ("Level bed") #define MSG_LEVEL_BED "\xcd\xde\xaf\xc4\xde\xda\xcd\xde\xd8\xdd\xb8\xde" // "ベッドレベリング" ("Level bed")
#define MSG_MOVING "\xb2\xc4\xde\xb3\xc1\xad\xb3" // "イドウチュウ" ("Moving...") #define MSG_MOVING "\xb2\xc4\xde\xb3\xc1\xad\xb3" // "イドウチュウ" ("Moving...")
#define MSG_FREE_XY "XY\xbc\xde\xb8\x20\xb6\xb2\xce\xb3" // "XYジク カイホウ" ("Free XY") #define MSG_FREE_XY "XY\xbc\xde\xb8\x20\xb6\xb2\xce\xb3" // "XYジク カイホウ" ("Free XY")
@ -129,6 +129,7 @@
#define MSG_A_RETRACT "\xcb\xb7\xba\xd0\xb6\xbf\xb8\xc4\xde" // "ヒキコミカソクド" ("A-retract") #define MSG_A_RETRACT "\xcb\xb7\xba\xd0\xb6\xbf\xb8\xc4\xde" // "ヒキコミカソクド" ("A-retract")
#define MSG_A_TRAVEL "\xb2\xc4\xde\xb3\xb6\xbf\xb8\xc4\xde" // "イドウカソクド" ("A-travel") #define MSG_A_TRAVEL "\xb2\xc4\xde\xb3\xb6\xbf\xb8\xc4\xde" // "イドウカソクド" ("A-travel")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_STEPS_PER_MM "Steps/mm"
#define MSG_XSTEPS "Xsteps/mm" #define MSG_XSTEPS "Xsteps/mm"
#define MSG_YSTEPS "Ysteps/mm" #define MSG_YSTEPS "Ysteps/mm"
#define MSG_ZSTEPS "Zsteps/mm" #define MSG_ZSTEPS "Zsteps/mm"
@ -139,6 +140,7 @@
#define MSG_E4STEPS "E4steps/mm" #define MSG_E4STEPS "E4steps/mm"
#define MSG_E5STEPS "E5steps/mm" #define MSG_E5STEPS "E5steps/mm"
#else #else
#define MSG_STEPS_PER_MM "Steps"
#define MSG_XSTEPS "Xsteps" #define MSG_XSTEPS "Xsteps"
#define MSG_YSTEPS "Ysteps" #define MSG_YSTEPS "Ysteps"
#define MSG_ZSTEPS "Zsteps" #define MSG_ZSTEPS "Zsteps"
@ -260,8 +262,7 @@
#define MSG_INFO_EXTRUDERS "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0\xbd\xb3" // "エクストルーダースウ" ("Extruders") #define MSG_INFO_EXTRUDERS "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0\xbd\xb3" // "エクストルーダースウ" ("Extruders")
#define MSG_INFO_BAUDRATE "\xce\xde\xb0\xda\xb0\xc4" // "ボーレート" ("Baud") #define MSG_INFO_BAUDRATE "\xce\xde\xb0\xda\xb0\xc4" // "ボーレート" ("Baud")
#define MSG_INFO_PROTOCOL "\xcc\xdf\xdb\xc4\xba\xd9" // "プロトコル" ("Protocol") #define MSG_INFO_PROTOCOL "\xcc\xdf\xdb\xc4\xba\xd9" // "プロトコル" ("Protocol")
#define MSG_LIGHTS_ON "\xb7\xae\xb3\xc0\xb2\xc5\xb2\xbc\xae\xb3\xd2\xb2\x20\xb5\xdd" // "キョウタイナイショウメイ オン" ("Case light on") #define MSG_CASE_LIGHT "\xb7\xae\xb3\xc0\xb2\xc5\xb2\xbc\xae\xb3\xd2\xb2" // "キョウタイナイショウメイ" ("Case light")
#define MSG_LIGHTS_OFF "\xb7\xae\xb3\xc0\xb2\xc5\xb2\xbc\xae\xb3\xd2\xb2\x20\xb5\xcc" // "キョウタイナイショウメイ オフ" ("Case light off")
#define MSG_INFO_PRINT_COUNT "\xcc\xdf\xd8\xdd\xc4\xbd\xb3" // "プリントスウ" ("Print Count") #define MSG_INFO_PRINT_COUNT "\xcc\xdf\xd8\xdd\xc4\xbd\xb3" // "プリントスウ" ("Print Count")
#define MSG_INFO_COMPLETED_PRINTS "\xb6\xdd\xd8\xae\xb3\xbd\xb3" // "カンリョウスウ" ("Completed") #define MSG_INFO_COMPLETED_PRINTS "\xb6\xdd\xd8\xae\xb3\xbd\xb3" // "カンリョウスウ" ("Completed")
#define MSG_INFO_PRINT_TIME "\xcc\xdf\xd8\xdd\xc4\xbc\xde\xb6\xdd\xd9\xb2\xb9\xb2" // "プリントジカンルイケイ" ("Total print time") #define MSG_INFO_PRINT_TIME "\xcc\xdf\xd8\xdd\xc4\xbc\xde\xb6\xdd\xd9\xb2\xb9\xb2" // "プリントジカンルイケイ" ("Total print time")
@ -285,8 +286,8 @@
#define MSG_DAC_PERCENT "DAC\xbc\xad\xc2\xd8\xae\xb8" // "DACシュツリョク" ("Driver %") #define MSG_DAC_PERCENT "DAC\xbc\xad\xc2\xd8\xae\xb8" // "DACシュツリョク" ("Driver %")
#endif #endif
#define MSG_DAC_EEPROM_WRITE MSG_STORE_EPROM // "メモリヘカクノウ" ("DAC EEPROM Write") #define MSG_DAC_EEPROM_WRITE MSG_STORE_EPROM // "メモリヘカクノウ" ("DAC EEPROM Write")
#define MSG_FILAMENT_CHANGE_HEADER "\xcc\xa8\xd7\xd2\xdd\xc4\xba\xb3\xb6\xdd" // "フィラメントコウカン" ("CHANGE FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER "PRINT PAUSED"
#define MSG_FILAMENT_CHANGE_OPTION_HEADER "\xc4\xde\xb3\xbb\xa6\xbe\xdd\xc0\xb8\xbc\xc3\xb8\xc0\xde\xbb\xb2" // "ドウサヲセンタクシテクダサイ" ("CHANGE OPTIONS:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER "RESUME OPTIONS:"
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "\xbb\xd7\xc6\xb5\xbc\xc0\xde\xbd" // "サラニオシダス" ("Extrude more") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "\xbb\xd7\xc6\xb5\xbc\xc0\xde\xbd" // "サラニオシダス" ("Extrude more")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "プリントサイカイ" ("Resume print") #define MSG_FILAMENT_CHANGE_OPTION_RESUME "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "プリントサイカイ" ("Resume print")

@ -55,7 +55,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("レベリングカイシ") // "Click to Begin" #define MSG_LEVEL_BED_WAITING _UxGT("レベリングカイシ") // "Click to Begin"
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("ツギノソクテイテンヘ") // "Next Point" #define MSG_LEVEL_BED_NEXT_POINT _UxGT("ツギノソクテイテンヘ") // "Next Point"
#define MSG_LEVEL_BED_DONE _UxGT("レベリングカンリョウ") // "Leveling Done!" #define MSG_LEVEL_BED_DONE _UxGT("レベリングカンリョウ") // "Leveling Done!"
#define MSG_LEVEL_BED_CANCEL _UxGT("トリヤメ") // "Cancel"
#define MSG_SET_HOME_OFFSETS _UxGT("キジュンオフセットセッテイ") // "Set home offsets" #define MSG_SET_HOME_OFFSETS _UxGT("キジュンオフセットセッテイ") // "Set home offsets"
#define MSG_HOME_OFFSETS_APPLIED _UxGT("オフセットガテキヨウサレマシタ") // "Offsets applied" #define MSG_HOME_OFFSETS_APPLIED _UxGT("オフセットガテキヨウサレマシタ") // "Offsets applied"
#define MSG_SET_ORIGIN _UxGT("キジュンセット") // "Set origin" #define MSG_SET_ORIGIN _UxGT("キジュンセット") // "Set origin"
@ -75,6 +74,7 @@
#define MSG_EXTRUDE _UxGT("オシダシ") // "Extrude" #define MSG_EXTRUDE _UxGT("オシダシ") // "Extrude"
#define MSG_RETRACT _UxGT("ヒキコミセッテイ") // "Retract" #define MSG_RETRACT _UxGT("ヒキコミセッテイ") // "Retract"
#define MSG_MOVE_AXIS _UxGT("ジクイドウ") // "Move axis" #define MSG_MOVE_AXIS _UxGT("ジクイドウ") // "Move axis"
#define MSG_BED_LEVELING _UxGT("ベッドレベリング") // "Bed leveling"
#define MSG_LEVEL_BED _UxGT("ベッドレベリング") // "Level bed" #define MSG_LEVEL_BED _UxGT("ベッドレベリング") // "Level bed"
#define MSG_MOVING _UxGT("イドウチュウ") // "Moving..." #define MSG_MOVING _UxGT("イドウチュウ") // "Moving..."
#define MSG_FREE_XY _UxGT("XYジク カイホウ") // "Free XY" #define MSG_FREE_XY _UxGT("XYジク カイホウ") // "Free XY"
@ -104,6 +104,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("センタク") // "Select" #define MSG_SELECT _UxGT("センタク") // "Select"
#define MSG_ACC _UxGT("カソクド mm/s2") // "Accel" #define MSG_ACC _UxGT("カソクド mm/s2") // "Accel"
#define MSG_JERK _UxGT("ヤクド mm/s") // "Jerk"
#define MSG_VX_JERK _UxGT("Xジク ヤクド mm/s") // "Vx-jerk" #define MSG_VX_JERK _UxGT("Xジク ヤクド mm/s") // "Vx-jerk"
#define MSG_VY_JERK _UxGT("Yジク ヤクド mm/s") // "Vy-jerk" #define MSG_VY_JERK _UxGT("Yジク ヤクド mm/s") // "Vy-jerk"
#define MSG_VZ_JERK _UxGT("Zジク ヤクド mm/s") // "Vz-jerk" #define MSG_VZ_JERK _UxGT("Zジク ヤクド mm/s") // "Vz-jerk"
@ -111,18 +112,10 @@
#define MSG_VMAX _UxGT("サイダイオクリソクド ") // "Vmax " #define MSG_VMAX _UxGT("サイダイオクリソクド ") // "Vmax "
#define MSG_VMIN _UxGT("サイショウオクリソクド") // "Vmin" #define MSG_VMIN _UxGT("サイショウオクリソクド") // "Vmin"
#define MSG_VTRAV_MIN _UxGT("サイショウイドウソクド") // "VTrav min" #define MSG_VTRAV_MIN _UxGT("サイショウイドウソクド") // "VTrav min"
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("サイダイカソクド ") // "Amax " #define MSG_AMAX _UxGT("サイダイカソクド ") // "Amax "
#define MSG_A_RETRACT _UxGT("ヒキコミカソクド") // "A-retract" #define MSG_A_RETRACT _UxGT("ヒキコミカソクド") // "A-retract"
#define MSG_A_TRAVEL _UxGT("イドウカソクド") // "A-travel" #define MSG_A_TRAVEL _UxGT("イドウカソクド") // "A-travel"
#define MSG_XSTEPS _UxGT("Xsteps/mm")
#define MSG_YSTEPS _UxGT("Ysteps/mm")
#define MSG_ZSTEPS _UxGT("Zsteps/mm")
#define MSG_ESTEPS _UxGT("Esteps/mm")
#define MSG_E1STEPS _UxGT("E1steps/mm")
#define MSG_E2STEPS _UxGT("E2steps/mm")
#define MSG_E3STEPS _UxGT("E3steps/mm")
#define MSG_E4STEPS _UxGT("E4steps/mm")
#define MSG_E5STEPS _UxGT("E5steps/mm")
#define MSG_TEMPERATURE _UxGT("オンド") // "Temperature" #define MSG_TEMPERATURE _UxGT("オンド") // "Temperature"
#define MSG_MOTION _UxGT("ウゴキセッテイ") // "Motion" #define MSG_MOTION _UxGT("ウゴキセッテイ") // "Motion"
#define MSG_FILAMENT _UxGT("フィラメント") // "Filament" #define MSG_FILAMENT _UxGT("フィラメント") // "Filament"
@ -199,8 +192,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("エクストルーダースウ") // "Extruders" #define MSG_INFO_EXTRUDERS _UxGT("エクストルーダースウ") // "Extruders"
#define MSG_INFO_BAUDRATE _UxGT("ボーレート") // "Baud" #define MSG_INFO_BAUDRATE _UxGT("ボーレート") // "Baud"
#define MSG_INFO_PROTOCOL _UxGT("プロトコル") // "Protocol" #define MSG_INFO_PROTOCOL _UxGT("プロトコル") // "Protocol"
#define MSG_LIGHTS_ON _UxGT("キョウタイナイショウメイ オン") // "Case light on" #define MSG_CASE_LIGHT _UxGT("キョウタイナイショウメイ") // "Case light"
#define MSG_LIGHTS_OFF _UxGT("キョウタイナイショウメイ オフ") // "Case light off"
#define MSG_INFO_PRINT_COUNT _UxGT("プリントスウ ") // "Print Count" #define MSG_INFO_PRINT_COUNT _UxGT("プリントスウ ") // "Print Count"
#define MSG_INFO_COMPLETED_PRINTS _UxGT("カンリョウスウ") // "Completed" #define MSG_INFO_COMPLETED_PRINTS _UxGT("カンリョウスウ") // "Completed"
#define MSG_INFO_PRINT_TIME _UxGT("プリントジカンルイケイ") // "Total print time" #define MSG_INFO_PRINT_TIME _UxGT("プリントジカンルイケイ") // "Total print time"
@ -212,8 +204,8 @@
#define MSG_DRIVE_STRENGTH _UxGT("モータークドウリョク") // "Drive Strength" #define MSG_DRIVE_STRENGTH _UxGT("モータークドウリョク") // "Drive Strength"
#define MSG_DAC_PERCENT _UxGT("DACシュツリョク %") // "Driver %" #define MSG_DAC_PERCENT _UxGT("DACシュツリョク %") // "Driver %"
#define MSG_DAC_EEPROM_WRITE MSG_STORE_EPROM // "DAC EEPROM Write" #define MSG_DAC_EEPROM_WRITE MSG_STORE_EPROM // "DAC EEPROM Write"
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("フィラメントコウカン") // "CHANGE FILAMENT" #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ドウサヲセンタクシテクダサイ") // "CHANGE OPTIONS:" #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("サラニオシダス") // "Extrude more" #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("サラニオシダス") // "Extrude more"
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("プリントサイカイ") // "Resume print" #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("プリントサイカイ") // "Resume print"
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("コウカンヲカイシシマス") // "Wait for start" #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("コウカンヲカイシシマス") // "Wait for start"

@ -50,7 +50,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Klik voor begin") #define MSG_LEVEL_BED_WAITING _UxGT("Klik voor begin")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Volgende Plaats") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Volgende Plaats")
#define MSG_LEVEL_BED_DONE _UxGT("Bed level kompl.") #define MSG_LEVEL_BED_DONE _UxGT("Bed level kompl.")
#define MSG_LEVEL_BED_CANCEL _UxGT("Bed level afbr.")
#define MSG_SET_HOME_OFFSETS _UxGT("Zet home offsets") #define MSG_SET_HOME_OFFSETS _UxGT("Zet home offsets")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("H offset toegep.") #define MSG_HOME_OFFSETS_APPLIED _UxGT("H offset toegep.")
#define MSG_SET_ORIGIN _UxGT("Nulpunt instellen") #define MSG_SET_ORIGIN _UxGT("Nulpunt instellen")
@ -72,6 +71,7 @@
#define MSG_EXTRUDE _UxGT("Extrude") #define MSG_EXTRUDE _UxGT("Extrude")
#define MSG_RETRACT _UxGT("Retract") #define MSG_RETRACT _UxGT("Retract")
#define MSG_MOVE_AXIS _UxGT("As verplaatsen") #define MSG_MOVE_AXIS _UxGT("As verplaatsen")
#define MSG_BED_LEVELING _UxGT("Bed Leveling")
#define MSG_LEVEL_BED _UxGT("Level bed") #define MSG_LEVEL_BED _UxGT("Level bed")
#define MSG_MOVING _UxGT("Verplaatsen...") #define MSG_MOVING _UxGT("Verplaatsen...")
#define MSG_FREE_XY _UxGT("Vrij XY") #define MSG_FREE_XY _UxGT("Vrij XY")
@ -101,6 +101,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Selecteer") #define MSG_SELECT _UxGT("Selecteer")
#define MSG_ACC _UxGT("Versn") #define MSG_ACC _UxGT("Versn")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -111,6 +112,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retract") #define MSG_A_RETRACT _UxGT("A-retract")
#define MSG_A_TRAVEL _UxGT("A-travel") #define MSG_A_TRAVEL _UxGT("A-travel")
#define MSG_STEPS_PER_MM _UxGT("Steps/mm")
#define MSG_XSTEPS _UxGT("Xsteps/mm") #define MSG_XSTEPS _UxGT("Xsteps/mm")
#define MSG_YSTEPS _UxGT("Ysteps/mm") #define MSG_YSTEPS _UxGT("Ysteps/mm")
#define MSG_ZSTEPS _UxGT("Zsteps/mm") #define MSG_ZSTEPS _UxGT("Zsteps/mm")
@ -200,8 +202,7 @@
#define MSG_INFO_MENU _UxGT("Over Printer") #define MSG_INFO_MENU _UxGT("Over Printer")
#define MSG_INFO_PRINTER_MENU _UxGT("Printer Info") #define MSG_INFO_PRINTER_MENU _UxGT("Printer Info")
#define MSG_INFO_PROTOCOL _UxGT("Protocol") #define MSG_INFO_PROTOCOL _UxGT("Protocol")
#define MSG_LIGHTS_ON _UxGT("Case licht aan") #define MSG_CASE_LIGHT _UxGT("Case licht")
#define MSG_LIGHTS_OFF _UxGT("Case licht uit")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Printed Aantal") #define MSG_INFO_PRINT_COUNT _UxGT("Printed Aantal")
@ -224,8 +225,8 @@
#define MSG_DRIVE_STRENGTH _UxGT("Motorstroom") #define MSG_DRIVE_STRENGTH _UxGT("Motorstroom")
#define MSG_DAC_PERCENT _UxGT("Driver %") //accepted English term in Dutch #define MSG_DAC_PERCENT _UxGT("Driver %") //accepted English term in Dutch
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC Opslaan") #define MSG_DAC_EEPROM_WRITE _UxGT("DAC Opslaan")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("WISSEL FILAMENT") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("WISSEL OPTIES:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrudeer meer") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Extrudeer meer")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Hervat print") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Hervat print")
#define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Minimum Temp is ") #define MSG_FILAMENT_CHANGE_MINTEMP _UxGT("Minimum Temp is ")

@ -0,0 +1,240 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Polish for DOGM display - includes accented characters
*/
#define WELCOME_MSG MACHINE_NAME _UxGT(" gotowy.")
#define MSG_SD_INSERTED _UxGT("Karta włożona")
#define MSG_SD_REMOVED _UxGT("Karta usunięta")
#define MSG_LCD_ENDSTOPS _UxGT("Kranców.") // Max length 8 characters
#define MSG_MAIN _UxGT("Menu główne")
#define MSG_AUTOSTART _UxGT("Autostart")
#define MSG_DISABLE_STEPPERS _UxGT("Wyłącz silniki")
#define MSG_AUTO_HOME _UxGT("Pozycja zerowa")
#define MSG_AUTO_HOME_X _UxGT("Zeruj X")
#define MSG_AUTO_HOME_Y _UxGT("Zeruj Y")
#define MSG_AUTO_HOME_Z _UxGT("Zeruj Z")
#define MSG_LEVEL_BED _UxGT("Poziom. stołu")
#define MSG_LEVEL_BED_HOMING _UxGT("Pozycja zerowa")
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknij by rozp.")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Następny punkt")
#define MSG_LEVEL_BED_DONE _UxGT("Wypoziomowano!")
#define MSG_SET_HOME_OFFSETS _UxGT("Ust. poz. zer.")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Poz. zerowa ust.")
#define MSG_SET_ORIGIN _UxGT("Ustaw punkt zero")
#define MSG_PREHEAT_1 _UxGT("Rozgrzej PLA")
#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ")
#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" wsz.")
#define MSG_PREHEAT_1_BEDONLY _UxGT("Rozgrzej stół PLA")
#define MSG_PREHEAT_1_SETTINGS _UxGT("Ustaw. rozg. PLA")
#define MSG_PREHEAT_2 _UxGT("Rozgrzej ABS")
#define MSG_PREHEAT_2_N MSG_PREHEAT_2 _UxGT(" ")
#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" wsz.")
#define MSG_PREHEAT_2_BEDONLY _UxGT("Rozgrzej stół ABS")
#define MSG_PREHEAT_2_SETTINGS _UxGT("Ustaw. rozg. ABS")
#define MSG_COOLDOWN _UxGT("Chłodzenie")
#define MSG_SWITCH_PS_ON _UxGT("Włącz zasilacz")
#define MSG_SWITCH_PS_OFF _UxGT("Wyłącz zasilacz")
#define MSG_EXTRUDE _UxGT("Ekstruzja")
#define MSG_RETRACT _UxGT("Wycofanie")
#define MSG_MOVE_AXIS _UxGT("Ruch osi")
#define MSG_BED_LEVELING _UxGT("Poziom. stołu")
#define MSG_MOVE_X _UxGT("Przesuń w X")
#define MSG_MOVE_Y _UxGT("Przesuń w Y")
#define MSG_MOVE_Z _UxGT("Przesuń w Z")
#define MSG_MOVE_E _UxGT("Ekstruzja (os E)")
#define MSG_MOVE_01MM _UxGT("Przesuń co .1mm")
#define MSG_MOVE_1MM _UxGT("Przesuń co 1mm")
#define MSG_MOVE_10MM _UxGT("Przesuń co 10mm")
#define MSG_SPEED _UxGT("Predkość")
#define MSG_BED_Z _UxGT("Stół Z")
#define MSG_NOZZLE _UxGT("Dysza")
#define MSG_BED _UxGT("Stół")
#define MSG_FAN_SPEED _UxGT("Obroty wiatraka")
#define MSG_FLOW _UxGT("Przepływ")
#define MSG_CONTROL _UxGT("Ustawienia")
#define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min")
#define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max")
#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Mnożnik")
#define MSG_AUTOTEMP _UxGT("Auto. temperatura")
#define MSG_ON _UxGT("Wł. ")
#define MSG_OFF _UxGT("Wył.")
#define MSG_PID_P _UxGT("PID-P")
#define MSG_PID_I _UxGT("PID-I")
#define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Select")
#define MSG_ACC _UxGT("Przyśpieszenie")
#define MSG_JERK _UxGT("Zryw")
#define MSG_VX_JERK _UxGT("Zryw Vx")
#define MSG_VY_JERK _UxGT("Zryw Vy")
#define MSG_VZ_JERK _UxGT("Zryw Vz")
#define MSG_VE_JERK _UxGT("Zryw Ve")
#define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("Vskok min")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Amax")
#define MSG_A_RETRACT _UxGT("A-wycofanie")
#define MSG_A_TRAVEL _UxGT("A-przesuń.")
#define MSG_STEPS_PER_MM _UxGT("kroki/mm")
#define MSG_XSTEPS _UxGT("krokiX/mm")
#define MSG_YSTEPS _UxGT("krokiY/mm")
#define MSG_ZSTEPS _UxGT("krokiZ/mm")
#define MSG_ESTEPS _UxGT("krokiE/mm")
#define MSG_E1STEPS _UxGT("krokiE1/mm")
#define MSG_E2STEPS _UxGT("krokiE2/mm")
#define MSG_E3STEPS _UxGT("krokiE3/mm")
#define MSG_E4STEPS _UxGT("krokiE4/mm")
#define MSG_E5STEPS _UxGT("krokiE5/mm")
#define MSG_TEMPERATURE _UxGT("Temperatura")
#define MSG_MOTION _UxGT("Ruch")
#define MSG_FILAMENT _UxGT("Filament")
#define MSG_VOLUMETRIC_ENABLED _UxGT("E w mm3")
#define MSG_FILAMENT_DIAM _UxGT("Śr. fil.")
#define MSG_CONTRAST _UxGT("Kontrast LCD")
#define MSG_STORE_EEPROM _UxGT("Zapisz w pamięci")
#define MSG_LOAD_EEPROM _UxGT("Wczytaj z pamięci")
#define MSG_RESTORE_FAILSAFE _UxGT("Ustaw. fabryczne")
#define MSG_REFRESH _UxGT("Odswież")
#define MSG_WATCH _UxGT("Ekran główny")
#define MSG_PREPARE _UxGT("Przygotuj")
#define MSG_TUNE _UxGT("Strojenie")
#define MSG_PAUSE_PRINT _UxGT("Pauza")
#define MSG_RESUME_PRINT _UxGT("Wznowienie")
#define MSG_STOP_PRINT _UxGT("Stop")
#define MSG_CARD_MENU _UxGT("Karta SD")
#define MSG_NO_CARD _UxGT("Brak karty")
#define MSG_DWELL _UxGT("Uśpij...")
#define MSG_USERWAIT _UxGT("Oczekiwanie...")
#define MSG_RESUMING _UxGT("Wznawianie druku")
#define MSG_PRINT_ABORTED _UxGT("Druk przerwany")
#define MSG_NO_MOVE _UxGT("Brak ruchu")
#define MSG_KILLED _UxGT("Ubity. ")
#define MSG_STOPPED _UxGT("Zatrzymany. ")
#define MSG_CONTROL_RETRACT _UxGT("Wycofaj mm")
#define MSG_CONTROL_RETRACT_SWAP _UxGT("Z Wycof. mm")
#define MSG_CONTROL_RETRACTF _UxGT("Wycofaj V")
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Skok Z mm")
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Cof. wycof. mm")
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Z Cof. wyc. mm")
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Cof. wycof. V")
#define MSG_AUTORETRACT _UxGT("Auto. wycofanie")
#define MSG_FILAMENTCHANGE _UxGT("Zmień filament")
#define MSG_INIT_SDCARD _UxGT("Inicjal. karty SD")
#define MSG_CNG_SDCARD _UxGT("Zmiana karty SD")
#define MSG_ZPROBE_OUT _UxGT("Sonda Z za stołem")
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("first")
#define MSG_ZPROBE_ZOFFSET _UxGT("Offset Z")
#define MSG_BABYSTEP_X _UxGT("Babystep X")
#define MSG_BABYSTEP_Y _UxGT("Babystep Y")
#define MSG_BABYSTEP_Z _UxGT("Babystep Z")
#define MSG_ENDSTOP_ABORT _UxGT("Błąd krańcówki")
#define MSG_HEATING_FAILED_LCD _UxGT("Rozgrz. nieudane")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Błąd temperatury")
#define MSG_THERMAL_RUNAWAY _UxGT("Zanik temp.")
#define MSG_ERR_MAXTEMP _UxGT("Err max temp")
#define MSG_ERR_MINTEMP _UxGT("Err min temp")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err max temp stołu")
#define MSG_ERR_MINTEMP_BED _UxGT("Err min temp stołu")
#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden")
#define MSG_HALTED _UxGT("Drukarka zatrzym.")
#define MSG_PLEASE_RESET _UxGT("Proszę zresetować")
#define MSG_SHORT_DAY _UxGT("d") // One character only
#define MSG_SHORT_HOUR _UxGT("g") // One character only
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("Rozgrzewanie...")
#define MSG_HEATING_COMPLETE _UxGT("Rozgrzano")
#define MSG_BED_HEATING _UxGT("Rozgrzewanie stołu...")
#define MSG_BED_DONE _UxGT("Rozgrzano stół")
#define MSG_DELTA_CALIBRATE _UxGT("Kalibrowanie Delty")
#define MSG_DELTA_CALIBRATE_X _UxGT("Kalibruj X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibruj Y")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Kalibruj Z")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Kalibruj środek")
#define MSG_INFO_MENU _UxGT("O drukarce")
#define MSG_INFO_PRINTER_MENU _UxGT("Info drukarki")
#define MSG_INFO_STATS_MENU _UxGT("Statystyki")
#define MSG_INFO_BOARD_MENU _UxGT("Board Info")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistory")
#define MSG_INFO_EXTRUDERS _UxGT("Ekstrudery")
#define MSG_INFO_BAUDRATE _UxGT("Predkość USB")
#define MSG_INFO_PROTOCOL _UxGT("Protokół")
#define MSG_CASE_LIGHT _UxGT("Oświetlenie")
#if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukończono")
#define MSG_INFO_PRINT_TIME _UxGT("Czas druku")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdł. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Użyty fil.")
#else
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukończono")
#define MSG_INFO_PRINT_TIME _UxGT("Razem")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdł. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Użyty fil.")
#endif
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
#define MSG_INFO_MAX_TEMP _UxGT("Max Temp")
#define MSG_INFO_PSU _UxGT("Zasilacz")
#define MSG_DRIVE_STRENGTH _UxGT("Siła silnika")
#define MSG_DAC_PERCENT _UxGT("Siła %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Zapisz DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("ZMIEŃ FILAMENT")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ZMIEŃ OPCJE:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Ekstruduj więcej")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Wznów drukowanie")
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Czekam na ")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("zmianę filamentu")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("wyjęcie filamentu")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Włóz filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("i naciśnij przycisk")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("aby kontynuować...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("włożenie filamentu")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("ekstruzję filamentu")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("wznowienie druku")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Proszę czekać...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wysuwanie...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Włóż i naciśnij prz.")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Ładowanie...")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Ekstruzja...")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wznowienie...")
#endif // LCD_HEIGHT < 4

@ -0,0 +1,265 @@
/**
* 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* Polish for HD44780 display - no accented characters
*/
#define WELCOME_MSG MACHINE_NAME _UxGT(" gotowy.")
#define MSG_SD_INSERTED _UxGT("Karta wlozona")
#define MSG_SD_REMOVED _UxGT("Karta usunieta")
#define MSG_LCD_ENDSTOPS _UxGT("Krancow.") // Max length 8 characters
#define MSG_MAIN _UxGT("Menu glowne")
#define MSG_AUTOSTART _UxGT("Autostart")
#define MSG_DISABLE_STEPPERS _UxGT("Wylacz silniki")
#define MSG_AUTO_HOME _UxGT("Pozycja zerowa")
#define MSG_AUTO_HOME_X _UxGT("Zeruj X")
#define MSG_AUTO_HOME_Y _UxGT("Zeruj Y")
#define MSG_AUTO_HOME_Z _UxGT("Zeruj Z")
#define MSG_LEVEL_BED _UxGT("Poziom. stolu")
#define MSG_LEVEL_BED_HOMING _UxGT("Pozycja zerowa")
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknij by rozp.")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Nastepny punkt")
#define MSG_LEVEL_BED_DONE _UxGT("Wypoziomowano!")
#define MSG_SET_HOME_OFFSETS _UxGT("Ust. poz. zer.")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Poz. zerowa ust.")
#define MSG_SET_ORIGIN _UxGT("Ustaw punkt zero")
#define MSG_PREHEAT_1 _UxGT("Rozgrzej PLA")
#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ")
#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" wsz.")
#define MSG_PREHEAT_1_BEDONLY _UxGT("Rozgrzej stol PLA")
#define MSG_PREHEAT_1_SETTINGS _UxGT("Ustaw. rozg. PLA")
#define MSG_PREHEAT_2 _UxGT("Rozgrzej ABS")
#define MSG_PREHEAT_2_N MSG_PREHEAT_2 _UxGT(" ")
#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" wsz.")
#define MSG_PREHEAT_2_BEDONLY _UxGT("Rozgrzej stol ABS")
#define MSG_PREHEAT_2_SETTINGS _UxGT("Ustaw. rozg. ABS")
#define MSG_COOLDOWN _UxGT("Chlodzenie")
#define MSG_SWITCH_PS_ON _UxGT("Wlacz zasilacz")
#define MSG_SWITCH_PS_OFF _UxGT("Wylacz zasilacz")
#define MSG_EXTRUDE _UxGT("Ekstruzja")
#define MSG_RETRACT _UxGT("Wycofanie")
#define MSG_MOVE_AXIS _UxGT("Ruch osi")
#define MSG_BED_LEVELING _UxGT("Poziom. stolu")
#define MSG_MOVE_X _UxGT("Przesun w X")
#define MSG_MOVE_Y _UxGT("Przesun w Y")
#define MSG_MOVE_Z _UxGT("Przesun w Z")
#define MSG_MOVE_E _UxGT("Ekstruzja (os E)")
#define MSG_MOVE_01MM _UxGT("Przesun co .1mm")
#define MSG_MOVE_1MM _UxGT("Przesun co 1mm")
#define MSG_MOVE_10MM _UxGT("Przesun co 10mm")
#define MSG_SPEED _UxGT("Predkosc")
#define MSG_BED_Z _UxGT("Stol Z")
#define MSG_NOZZLE _UxGT("Dysza")
#define MSG_BED _UxGT("Stol")
#define MSG_FAN_SPEED _UxGT("Obroty wiatraka")
#define MSG_FLOW _UxGT("Przeplyw")
#define MSG_CONTROL _UxGT("Ustawienia")
#define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min")
#define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max")
#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Mnoznik")
#define MSG_AUTOTEMP _UxGT("Auto. temperatura")
#define MSG_ON _UxGT("Wl. ")
#define MSG_OFF _UxGT("Wyl.")
#define MSG_PID_P _UxGT("PID-P")
#define MSG_PID_I _UxGT("PID-I")
#define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Select")
#define MSG_ACC _UxGT("Przyspieszenie")
#define MSG_JERK _UxGT("Zryw")
#define MSG_VX_JERK _UxGT("Zryw Vx")
#define MSG_VY_JERK _UxGT("Zryw Vy")
#define MSG_VZ_JERK _UxGT("Zryw Vz")
#define MSG_VE_JERK _UxGT("Zryw Ve")
#define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("Vskok min")
#define MSG_ACCELERATION MSG_ACC
#define MSG_AMAX _UxGT("Amax")
#define MSG_A_RETRACT _UxGT("A-wycofanie")
#define MSG_A_TRAVEL _UxGT("A-przesun.")
#define MSG_STEPS_PER_MM _UxGT("kroki/mm")
#define MSG_XSTEPS _UxGT("krokiX/mm")
#define MSG_YSTEPS _UxGT("krokiY/mm")
#define MSG_ZSTEPS _UxGT("krokiZ/mm")
#define MSG_ESTEPS _UxGT("krokiE/mm")
#define MSG_E1STEPS _UxGT("krokiE1/mm")
#define MSG_E2STEPS _UxGT("krokiE2/mm")
#define MSG_E3STEPS _UxGT("krokiE3/mm")
#define MSG_E4STEPS _UxGT("krokiE4/mm")
#define MSG_E5STEPS _UxGT("krokiE5/mm")
#define MSG_TEMPERATURE _UxGT("Temperatura")
#define MSG_MOTION _UxGT("Ruch")
#define MSG_FILAMENT _UxGT("Filament")
#define MSG_VOLUMETRIC_ENABLED _UxGT("E w mm3")
#define MSG_FILAMENT_DIAM _UxGT("Sr. fil.")
#define MSG_CONTRAST _UxGT("Kontrast LCD")
#define MSG_STORE_EEPROM _UxGT("Zapisz w pamieci")
#define MSG_LOAD_EEPROM _UxGT("Wczytaj z pamieci")
#define MSG_RESTORE_FAILSAFE _UxGT("Ustaw. fabryczne")
#define MSG_REFRESH _UxGT("Odswiez")
#define MSG_WATCH _UxGT("Ekran glowny")
#define MSG_PREPARE _UxGT("Przygotuj")
#define MSG_TUNE _UxGT("Strojenie")
#define MSG_PAUSE_PRINT _UxGT("Pauza")
#define MSG_RESUME_PRINT _UxGT("Wznowienie")
#define MSG_STOP_PRINT _UxGT("Stop")
#define MSG_CARD_MENU _UxGT("Karta SD")
#define MSG_NO_CARD _UxGT("Brak karty")
#define MSG_DWELL _UxGT("Uspij...")
#define MSG_USERWAIT _UxGT("Oczekiwanie...")
#define MSG_RESUMING _UxGT("Wznawianie druku")
#define MSG_PRINT_ABORTED _UxGT("Druk przerwany")
#define MSG_NO_MOVE _UxGT("Brak ruchu")
#define MSG_KILLED _UxGT("Ubity. ")
#define MSG_STOPPED _UxGT("Zatrzymany. ")
#define MSG_CONTROL_RETRACT _UxGT("Wycofaj mm")
#define MSG_CONTROL_RETRACT_SWAP _UxGT("Z Wycof. mm")
#define MSG_CONTROL_RETRACTF _UxGT("Wycofaj V")
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Skok Z mm")
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Cof. wycof. mm")
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Z Cof. wyc. mm")
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Cof. wycof. V")
#define MSG_AUTORETRACT _UxGT("Auto. wycofanie")
#define MSG_FILAMENTCHANGE _UxGT("Zmien filament")
#define MSG_INIT_SDCARD _UxGT("Inicjal. karty SD")
#define MSG_CNG_SDCARD _UxGT("Zmiana karty SD")
#define MSG_ZPROBE_OUT _UxGT("Sonda Z za stolem")
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("first")
#define MSG_ZPROBE_ZOFFSET _UxGT("Offset Z")
#define MSG_BABYSTEP_X _UxGT("Babystep X")
#define MSG_BABYSTEP_Y _UxGT("Babystep Y")
#define MSG_BABYSTEP_Z _UxGT("Babystep Z")
#define MSG_ENDSTOP_ABORT _UxGT("Blad krancowki")
#define MSG_HEATING_FAILED_LCD _UxGT("Rozgrz. nieudane")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Blad temperatury")
#define MSG_THERMAL_RUNAWAY _UxGT("Zanik temp.")
#define MSG_ERR_MAXTEMP _UxGT("Err max temp")
#define MSG_ERR_MINTEMP _UxGT("Err min temp")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err max temp stolu")
#define MSG_ERR_MINTEMP_BED _UxGT("Err min temp stolu")
#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden")
#define MSG_HALTED _UxGT("Drukarka zatrzym.")
#define MSG_PLEASE_RESET _UxGT("Prosze zresetowac")
#define MSG_SHORT_DAY _UxGT("d") // One character only
#define MSG_SHORT_HOUR _UxGT("g") // One character only
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("Rozgrzewanie...")
#define MSG_HEATING_COMPLETE _UxGT("Rozgrzano")
#define MSG_BED_HEATING _UxGT("Rozgrzewanie stolu...")
#define MSG_BED_DONE _UxGT("Rozgrzano stol")
#define MSG_DELTA_CALIBRATE _UxGT("Kalibrowanie Delty")
#define MSG_DELTA_CALIBRATE_X _UxGT("Kalibruj X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibruj Y")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Kalibruj Z")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Kalibruj srodek")
#define MSG_INFO_MENU _UxGT("O drukarce")
#define MSG_INFO_PRINTER_MENU _UxGT("Info drukarki")
#define MSG_INFO_STATS_MENU _UxGT("Statystyki")
#define MSG_INFO_BOARD_MENU _UxGT("Board Info")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistory")
#define MSG_INFO_EXTRUDERS _UxGT("Ekstrudery")
#define MSG_INFO_BAUDRATE _UxGT("Predkosc USB")
#define MSG_INFO_PROTOCOL _UxGT("Protokol")
#define MSG_CASE_LIGHT _UxGT("Oswietlenie")
#if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukonczono")
#define MSG_INFO_PRINT_TIME _UxGT("Czas druku")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdl. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Uzyty fil.")
#else
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukonczono")
#define MSG_INFO_PRINT_TIME _UxGT("Razem")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdl. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Uzyty fil.")
#endif
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
#define MSG_INFO_MAX_TEMP _UxGT("Max Temp")
#define MSG_INFO_PSU _UxGT("Zasilacz")
#define MSG_DRIVE_STRENGTH _UxGT("Sila silnika")
#define MSG_DAC_PERCENT _UxGT("Sila %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Zapisz DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("ZMIEN FILAMENT")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ZMIEN OPCJE:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Ekstruduj wiecej")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Wznow drukowanie")
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Czekam na ")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("zmiane filamentu")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("wyjecie filamentu")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Wloz filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("i nacisnij przycisk")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("aby kontynuowac...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("wlozenie filamentu")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("ekstruzje filamentu")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("wznowienie druku")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Prosze czekac...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wysuwanie...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Wloz i nacisnij prz.")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Ladowanie...")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Ekstruzja...")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wznowienie...")
#endif // LCD_HEIGHT < 4
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Czekam na ")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("zmiane filamentu")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("wyjecie filamentu")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Wloz filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("i nacisnij przycisk")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("aby kontynuowac...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("wlozenie filamentu")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("ekstruzje filamentu")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("wznowienie druku")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Prosze czekac...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wysuwanie...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Wloz i nacisnij prz.")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Ladowanie...")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Ekstruzja...")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wznowienie...")
#endif // LCD_HEIGHT < 4

@ -33,435 +33,13 @@
#define DISPLAY_CHARSET_ISO10646_PL #define DISPLAY_CHARSET_ISO10646_PL
#define MAPPER_C3C4C5_PL #define MAPPER_C3C4C5_PL
/**
* One version with accented characters and one without
*/
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
#include "language_pl-DOGM.h"
#define WELCOME_MSG MACHINE_NAME _UxGT(" gotowy.")
#define MSG_SD_INSERTED _UxGT("Karta włożona")
#define MSG_SD_REMOVED _UxGT("Karta usunięta")
#define MSG_LCD_ENDSTOPS _UxGT("Kranców.") // Max length 8 characters
#define MSG_MAIN _UxGT("Menu główne")
#define MSG_AUTOSTART _UxGT("Autostart")
#define MSG_DISABLE_STEPPERS _UxGT("Wyłącz silniki")
#define MSG_AUTO_HOME _UxGT("Pozycja zerowa")
#define MSG_AUTO_HOME_X _UxGT("Zeruj X")
#define MSG_AUTO_HOME_Y _UxGT("Zeruj Y")
#define MSG_AUTO_HOME_Z _UxGT("Zeruj Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Pozycja zerowa")
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknij by rozp.")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Następny punkt")
#define MSG_LEVEL_BED_DONE _UxGT("Wypoziomowano!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Anuluj")
#define MSG_SET_HOME_OFFSETS _UxGT("Ust. poz. zer.")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Poz. zerowa ust.")
#define MSG_SET_ORIGIN _UxGT("Ustaw punkt zero")
#define MSG_PREHEAT_1 _UxGT("Rozgrzej PLA")
#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ")
#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" wsz.")
#define MSG_PREHEAT_1_BEDONLY _UxGT("Rozgrzej stół PLA")
#define MSG_PREHEAT_1_SETTINGS _UxGT("Ustaw. rozg. PLA")
#define MSG_PREHEAT_2 _UxGT("Rozgrzej ABS")
#define MSG_PREHEAT_2_N MSG_PREHEAT_2 _UxGT(" ")
#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" wsz.")
#define MSG_PREHEAT_2_BEDONLY _UxGT("Rozgrzej stół ABS")
#define MSG_PREHEAT_2_SETTINGS _UxGT("Ustaw. rozg. ABS")
#define MSG_COOLDOWN _UxGT("Chłodzenie")
#define MSG_SWITCH_PS_ON _UxGT("Włącz zasilacz")
#define MSG_SWITCH_PS_OFF _UxGT("Wyłącz zasilacz")
#define MSG_EXTRUDE _UxGT("Ekstruzja")
#define MSG_RETRACT _UxGT("Wycofanie")
#define MSG_MOVE_AXIS _UxGT("Ruch osi")
#define MSG_LEVEL_BED _UxGT("Poziom. stołu")
#define MSG_MOVE_X _UxGT("Przesuń w X")
#define MSG_MOVE_Y _UxGT("Przesuń w Y")
#define MSG_MOVE_Z _UxGT("Przesuń w Z")
#define MSG_MOVE_E _UxGT("Ekstruzja (os E)")
#define MSG_MOVE_01MM _UxGT("Przesuń co .1mm")
#define MSG_MOVE_1MM _UxGT("Przesuń co 1mm")
#define MSG_MOVE_10MM _UxGT("Przesuń co 10mm")
#define MSG_SPEED _UxGT("Predkość")
#define MSG_BED_Z _UxGT("Stół Z")
#define MSG_NOZZLE _UxGT("Dysza")
#define MSG_BED _UxGT("Stół")
#define MSG_FAN_SPEED _UxGT("Obroty wiatraka")
#define MSG_FLOW _UxGT("Przepływ")
#define MSG_CONTROL _UxGT("Ustawienia")
#define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min")
#define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max")
#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Mnożnik")
#define MSG_AUTOTEMP _UxGT("Auto. temperatura")
#define MSG_ON _UxGT("Wł. ")
#define MSG_OFF _UxGT("Wył.")
#define MSG_PID_P _UxGT("PID-P")
#define MSG_PID_I _UxGT("PID-I")
#define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Select")
#define MSG_ACC _UxGT("Przyśpieszenie")
#define MSG_VX_JERK _UxGT("Zryw Vx")
#define MSG_VY_JERK _UxGT("Zryw Vy")
#define MSG_VZ_JERK _UxGT("Zryw Vz")
#define MSG_VE_JERK _UxGT("Zryw Ve")
#define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("Vskok min")
#define MSG_AMAX _UxGT("Amax")
#define MSG_A_RETRACT _UxGT("A-wycofanie")
#define MSG_A_TRAVEL _UxGT("A-przesuń.")
#define MSG_XSTEPS _UxGT("krokiX/mm")
#define MSG_YSTEPS _UxGT("krokiY/mm")
#define MSG_ZSTEPS _UxGT("krokiZ/mm")
#define MSG_ESTEPS _UxGT("krokiE/mm")
#define MSG_E1STEPS _UxGT("krokiE1/mm")
#define MSG_E2STEPS _UxGT("krokiE2/mm")
#define MSG_E3STEPS _UxGT("krokiE3/mm")
#define MSG_E4STEPS _UxGT("krokiE4/mm")
#define MSG_E5STEPS _UxGT("krokiE5/mm")
#define MSG_TEMPERATURE _UxGT("Temperatura")
#define MSG_MOTION _UxGT("Ruch")
#define MSG_FILAMENT _UxGT("Filament")
#define MSG_VOLUMETRIC_ENABLED _UxGT("E w mm3")
#define MSG_FILAMENT_DIAM _UxGT("Śr. fil.")
#define MSG_CONTRAST _UxGT("Kontrast LCD")
#define MSG_STORE_EEPROM _UxGT("Zapisz w pamięci")
#define MSG_LOAD_EEPROM _UxGT("Wczytaj z pamięci")
#define MSG_RESTORE_FAILSAFE _UxGT("Ustaw. fabryczne")
#define MSG_REFRESH _UxGT("Odswież")
#define MSG_WATCH _UxGT("Ekran główny")
#define MSG_PREPARE _UxGT("Przygotuj")
#define MSG_TUNE _UxGT("Strojenie")
#define MSG_PAUSE_PRINT _UxGT("Pauza")
#define MSG_RESUME_PRINT _UxGT("Wznowienie")
#define MSG_STOP_PRINT _UxGT("Stop")
#define MSG_CARD_MENU _UxGT("Karta SD")
#define MSG_NO_CARD _UxGT("Brak karty")
#define MSG_DWELL _UxGT("Uśpij...")
#define MSG_USERWAIT _UxGT("Oczekiwanie...")
#define MSG_RESUMING _UxGT("Wznawianie druku")
#define MSG_PRINT_ABORTED _UxGT("Druk przerwany")
#define MSG_NO_MOVE _UxGT("Brak ruchu")
#define MSG_KILLED _UxGT("Ubity. ")
#define MSG_STOPPED _UxGT("Zatrzymany. ")
#define MSG_CONTROL_RETRACT _UxGT("Wycofaj mm")
#define MSG_CONTROL_RETRACT_SWAP _UxGT("Z Wycof. mm")
#define MSG_CONTROL_RETRACTF _UxGT("Wycofaj V")
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Skok Z mm")
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Cof. wycof. mm")
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Z Cof. wyc. mm")
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Cof. wycof. V")
#define MSG_AUTORETRACT _UxGT("Auto. wycofanie")
#define MSG_FILAMENTCHANGE _UxGT("Zmień filament")
#define MSG_INIT_SDCARD _UxGT("Inicjal. karty SD")
#define MSG_CNG_SDCARD _UxGT("Zmiana karty SD")
#define MSG_ZPROBE_OUT _UxGT("Sonda Z za stołem")
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("first")
#define MSG_ZPROBE_ZOFFSET _UxGT("Offset Z")
#define MSG_BABYSTEP_X _UxGT("Babystep X")
#define MSG_BABYSTEP_Y _UxGT("Babystep Y")
#define MSG_BABYSTEP_Z _UxGT("Babystep Z")
#define MSG_ENDSTOP_ABORT _UxGT("Błąd krańcówki")
#define MSG_HEATING_FAILED_LCD _UxGT("Rozgrz. nieudane")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Błąd temperatury")
#define MSG_THERMAL_RUNAWAY _UxGT("Zanik temp.")
#define MSG_ERR_MAXTEMP _UxGT("Err max temp")
#define MSG_ERR_MINTEMP _UxGT("Err min temp")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err max temp stołu")
#define MSG_ERR_MINTEMP_BED _UxGT("Err min temp stołu")
#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden")
#define MSG_HALTED _UxGT("Drukarka zatrzym.")
#define MSG_PLEASE_RESET _UxGT("Proszę zresetować")
#define MSG_SHORT_DAY _UxGT("d") // One character only
#define MSG_SHORT_HOUR _UxGT("g") // One character only
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("Rozgrzewanie...")
#define MSG_HEATING_COMPLETE _UxGT("Rozgrzano")
#define MSG_BED_HEATING _UxGT("Rozgrzewanie stołu...")
#define MSG_BED_DONE _UxGT("Rozgrzano stół")
#define MSG_DELTA_CALIBRATE _UxGT("Kalibrowanie Delty")
#define MSG_DELTA_CALIBRATE_X _UxGT("Kalibruj X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibruj Y")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Kalibruj Z")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Kalibruj środek")
#define MSG_INFO_MENU _UxGT("O drukarce")
#define MSG_INFO_PRINTER_MENU _UxGT("Info drukarki")
#define MSG_INFO_STATS_MENU _UxGT("Statystyki")
#define MSG_INFO_BOARD_MENU _UxGT("Board Info")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistory")
#define MSG_INFO_EXTRUDERS _UxGT("Ekstrudery")
#define MSG_INFO_BAUDRATE _UxGT("Predkość USB")
#define MSG_INFO_PROTOCOL _UxGT("Protokół")
#define MSG_LIGHTS_ON _UxGT("Oświetlenie wl.")
#define MSG_LIGHTS_OFF _UxGT("Oświetlenie wyl.")
#if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukończono")
#define MSG_INFO_PRINT_TIME _UxGT("Czas druku")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdł. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Użyty fil.")
#else #else
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano") #include "language_pl-HD44780.h"
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukończono")
#define MSG_INFO_PRINT_TIME _UxGT("Razem")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdł. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Użyty fil.")
#endif
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
#define MSG_INFO_MAX_TEMP _UxGT("Max Temp")
#define MSG_INFO_PSU _UxGT("Zasilacz")
#define MSG_DRIVE_STRENGTH _UxGT("Siła silnika")
#define MSG_DAC_PERCENT _UxGT("Siła %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Zapisz DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("ZMIEŃ FILAMENT")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ZMIEŃ OPCJE:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Ekstruduj więcej")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Wznów drukowanie")
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Czekam na ")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("zmianę filamentu")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("wyjęcie filamentu")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Włóz filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("i naciśnij przycisk")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("aby kontynuować...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("włożenie filamentu")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("ekstruzję filamentu")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("wznowienie druku")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Proszę czekać...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wysuwanie...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Włóż i naciśnij prz.")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Ładowanie...")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Ekstruzja...")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wznowienie...")
#endif // LCD_HEIGHT < 4
#else
#define WELCOME_MSG MACHINE_NAME _UxGT(" gotowy.")
#define MSG_SD_INSERTED _UxGT("Karta wlozona")
#define MSG_SD_REMOVED _UxGT("Karta usunieta")
#define MSG_LCD_ENDSTOPS _UxGT("Krancow.") // Max length 8 characters
#define MSG_MAIN _UxGT("Menu glowne")
#define MSG_AUTOSTART _UxGT("Autostart")
#define MSG_DISABLE_STEPPERS _UxGT("Wylacz silniki")
#define MSG_AUTO_HOME _UxGT("Pozycja zerowa")
#define MSG_AUTO_HOME_X _UxGT("Zeruj X")
#define MSG_AUTO_HOME_Y _UxGT("Zeruj Y")
#define MSG_AUTO_HOME_Z _UxGT("Zeruj Z")
#define MSG_LEVEL_BED_HOMING _UxGT("Pozycja zerowa")
#define MSG_LEVEL_BED_WAITING _UxGT("Kliknij by rozp.")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Nastepny punkt")
#define MSG_LEVEL_BED_DONE _UxGT("Wypoziomowano!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Anuluj")
#define MSG_SET_HOME_OFFSETS _UxGT("Ust. poz. zer.")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Poz. zerowa ust.")
#define MSG_SET_ORIGIN _UxGT("Ustaw punkt zero")
#define MSG_PREHEAT_1 _UxGT("Rozgrzej PLA")
#define MSG_PREHEAT_1_N MSG_PREHEAT_1 _UxGT(" ")
#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" wsz.")
#define MSG_PREHEAT_1_BEDONLY _UxGT("Rozgrzej stol PLA")
#define MSG_PREHEAT_1_SETTINGS _UxGT("Ustaw. rozg. PLA")
#define MSG_PREHEAT_2 _UxGT("Rozgrzej ABS")
#define MSG_PREHEAT_2_N MSG_PREHEAT_2 _UxGT(" ")
#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" wsz.")
#define MSG_PREHEAT_2_BEDONLY _UxGT("Rozgrzej stol ABS")
#define MSG_PREHEAT_2_SETTINGS _UxGT("Ustaw. rozg. ABS")
#define MSG_COOLDOWN _UxGT("Chlodzenie")
#define MSG_SWITCH_PS_ON _UxGT("Wlacz zasilacz")
#define MSG_SWITCH_PS_OFF _UxGT("Wylacz zasilacz")
#define MSG_EXTRUDE _UxGT("Ekstruzja")
#define MSG_RETRACT _UxGT("Wycofanie")
#define MSG_MOVE_AXIS _UxGT("Ruch osi")
#define MSG_LEVEL_BED _UxGT("Poziom. stolu")
#define MSG_MOVE_X _UxGT("Przesun w X")
#define MSG_MOVE_Y _UxGT("Przesun w Y")
#define MSG_MOVE_Z _UxGT("Przesun w Z")
#define MSG_MOVE_E _UxGT("Ekstruzja (os E)")
#define MSG_MOVE_01MM _UxGT("Przesun co .1mm")
#define MSG_MOVE_1MM _UxGT("Przesun co 1mm")
#define MSG_MOVE_10MM _UxGT("Przesun co 10mm")
#define MSG_SPEED _UxGT("Predkosc")
#define MSG_BED_Z _UxGT("Stol Z")
#define MSG_NOZZLE _UxGT("Dysza")
#define MSG_BED _UxGT("Stol")
#define MSG_FAN_SPEED _UxGT("Obroty wiatraka")
#define MSG_FLOW _UxGT("Przeplyw")
#define MSG_CONTROL _UxGT("Ustawienia")
#define MSG_MIN LCD_STR_THERMOMETER _UxGT(" Min")
#define MSG_MAX LCD_STR_THERMOMETER _UxGT(" Max")
#define MSG_FACTOR LCD_STR_THERMOMETER _UxGT(" Mnoznik")
#define MSG_AUTOTEMP _UxGT("Auto. temperatura")
#define MSG_ON _UxGT("Wl. ")
#define MSG_OFF _UxGT("Wyl.")
#define MSG_PID_P _UxGT("PID-P")
#define MSG_PID_I _UxGT("PID-I")
#define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Select")
#define MSG_ACC _UxGT("Przyspieszenie")
#define MSG_VX_JERK _UxGT("Zryw Vx")
#define MSG_VY_JERK _UxGT("Zryw Vy")
#define MSG_VZ_JERK _UxGT("Zryw Vz")
#define MSG_VE_JERK _UxGT("Zryw Ve")
#define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin")
#define MSG_VTRAV_MIN _UxGT("Vskok min")
#define MSG_AMAX _UxGT("Amax")
#define MSG_A_RETRACT _UxGT("A-wycofanie")
#define MSG_A_TRAVEL _UxGT("A-przesun.")
#define MSG_XSTEPS _UxGT("krokiX/mm")
#define MSG_YSTEPS _UxGT("krokiY/mm")
#define MSG_ZSTEPS _UxGT("krokiZ/mm")
#define MSG_ESTEPS _UxGT("krokiE/mm")
#define MSG_E1STEPS _UxGT("krokiE1/mm")
#define MSG_E2STEPS _UxGT("krokiE2/mm")
#define MSG_E3STEPS _UxGT("krokiE3/mm")
#define MSG_E4STEPS _UxGT("krokiE4/mm")
#define MSG_E5STEPS _UxGT("krokiE5/mm")
#define MSG_TEMPERATURE _UxGT("Temperatura")
#define MSG_MOTION _UxGT("Ruch")
#define MSG_FILAMENT _UxGT("Filament")
#define MSG_VOLUMETRIC_ENABLED _UxGT("E w mm3")
#define MSG_FILAMENT_DIAM _UxGT("Sr. fil.")
#define MSG_CONTRAST _UxGT("Kontrast LCD")
#define MSG_STORE_EEPROM _UxGT("Zapisz w pamieci")
#define MSG_LOAD_EEPROM _UxGT("Wczytaj z pamieci")
#define MSG_RESTORE_FAILSAFE _UxGT("Ustaw. fabryczne")
#define MSG_REFRESH _UxGT("Odswiez")
#define MSG_WATCH _UxGT("Ekran glowny")
#define MSG_PREPARE _UxGT("Przygotuj")
#define MSG_TUNE _UxGT("Strojenie")
#define MSG_PAUSE_PRINT _UxGT("Pauza")
#define MSG_RESUME_PRINT _UxGT("Wznowienie")
#define MSG_STOP_PRINT _UxGT("Stop")
#define MSG_CARD_MENU _UxGT("Karta SD")
#define MSG_NO_CARD _UxGT("Brak karty")
#define MSG_DWELL _UxGT("Uspij...")
#define MSG_USERWAIT _UxGT("Oczekiwanie...")
#define MSG_RESUMING _UxGT("Wznawianie druku")
#define MSG_PRINT_ABORTED _UxGT("Druk przerwany")
#define MSG_NO_MOVE _UxGT("Brak ruchu")
#define MSG_KILLED _UxGT("Ubity. ")
#define MSG_STOPPED _UxGT("Zatrzymany. ")
#define MSG_CONTROL_RETRACT _UxGT("Wycofaj mm")
#define MSG_CONTROL_RETRACT_SWAP _UxGT("Z Wycof. mm")
#define MSG_CONTROL_RETRACTF _UxGT("Wycofaj V")
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Skok Z mm")
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("Cof. wycof. mm")
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Z Cof. wyc. mm")
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Cof. wycof. V")
#define MSG_AUTORETRACT _UxGT("Auto. wycofanie")
#define MSG_FILAMENTCHANGE _UxGT("Zmien filament")
#define MSG_INIT_SDCARD _UxGT("Inicjal. karty SD")
#define MSG_CNG_SDCARD _UxGT("Zmiana karty SD")
#define MSG_ZPROBE_OUT _UxGT("Sonda Z za stolem")
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("first")
#define MSG_ZPROBE_ZOFFSET _UxGT("Offset Z")
#define MSG_BABYSTEP_X _UxGT("Babystep X")
#define MSG_BABYSTEP_Y _UxGT("Babystep Y")
#define MSG_BABYSTEP_Z _UxGT("Babystep Z")
#define MSG_ENDSTOP_ABORT _UxGT("Blad krancowki")
#define MSG_HEATING_FAILED_LCD _UxGT("Rozgrz. nieudane")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Blad temperatury")
#define MSG_THERMAL_RUNAWAY _UxGT("Zanik temp.")
#define MSG_ERR_MAXTEMP _UxGT("Err max temp")
#define MSG_ERR_MINTEMP _UxGT("Err min temp")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err max temp stolu")
#define MSG_ERR_MINTEMP_BED _UxGT("Err min temp stolu")
#define MSG_ERR_Z_HOMING _UxGT("G28 Z Forbidden")
#define MSG_HALTED _UxGT("Drukarka zatrzym.")
#define MSG_PLEASE_RESET _UxGT("Prosze zresetowac")
#define MSG_SHORT_DAY _UxGT("d") // One character only
#define MSG_SHORT_HOUR _UxGT("g") // One character only
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("Rozgrzewanie...")
#define MSG_HEATING_COMPLETE _UxGT("Rozgrzano")
#define MSG_BED_HEATING _UxGT("Rozgrzewanie stolu...")
#define MSG_BED_DONE _UxGT("Rozgrzano stol")
#define MSG_DELTA_CALIBRATE _UxGT("Kalibrowanie Delty")
#define MSG_DELTA_CALIBRATE_X _UxGT("Kalibruj X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibruj Y")
#define MSG_DELTA_CALIBRATE_Z _UxGT("Kalibruj Z")
#define MSG_DELTA_CALIBRATE_CENTER _UxGT("Kalibruj srodek")
#define MSG_INFO_MENU _UxGT("O drukarce")
#define MSG_INFO_PRINTER_MENU _UxGT("Info drukarki")
#define MSG_INFO_STATS_MENU _UxGT("Statystyki")
#define MSG_INFO_BOARD_MENU _UxGT("Board Info")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistory")
#define MSG_INFO_EXTRUDERS _UxGT("Ekstrudery")
#define MSG_INFO_BAUDRATE _UxGT("Predkosc USB")
#define MSG_INFO_PROTOCOL _UxGT("Protokol")
#define MSG_LIGHTS_ON _UxGT("Oswietlenie wl.")
#define MSG_LIGHTS_OFF _UxGT("Oswietlenie wyl.")
#if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukonczono")
#define MSG_INFO_PRINT_TIME _UxGT("Czas druku")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdl. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Uzyty fil.")
#else
#define MSG_INFO_PRINT_COUNT _UxGT("Wydrukowano")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Ukonczono")
#define MSG_INFO_PRINT_TIME _UxGT("Razem")
#define MSG_INFO_PRINT_LONGEST _UxGT("Najdl. druk")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Uzyty fil.")
#endif
#define MSG_INFO_MIN_TEMP _UxGT("Min Temp")
#define MSG_INFO_MAX_TEMP _UxGT("Max Temp")
#define MSG_INFO_PSU _UxGT("Zasilacz")
#define MSG_DRIVE_STRENGTH _UxGT("Sila silnika")
#define MSG_DAC_PERCENT _UxGT("Sila %")
#define MSG_DAC_EEPROM_WRITE _UxGT("Zapisz DAC EEPROM")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("ZMIEN FILAMENT")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("ZMIEN OPCJE:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Ekstruduj wiecej")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Wznow drukowanie")
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Czekam na ")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("zmiane filamentu")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("wyjecie filamentu")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Wloz filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("i nacisnij przycisk")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("aby kontynuowac...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("wlozenie filamentu")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_EXTRUDE_2 _UxGT("ekstruzje filamentu")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Czekam na")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("wznowienie druku")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Prosze czekac...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wysuwanie...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Wloz i nacisnij prz.")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Ladowanie...")
#define MSG_FILAMENT_CHANGE_EXTRUDE_1 _UxGT("Ekstruzja...")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wznowienie...")
#endif // LCD_HEIGHT < 4
#endif #endif
#endif // LANGUAGE_PL_H #endif // LANGUAGE_PL_H

@ -42,7 +42,6 @@
#define MSG_LEVEL_BED_HOMING "Homing XYZ" #define MSG_LEVEL_BED_HOMING "Homing XYZ"
#define MSG_LEVEL_BED_WAITING "Click to Begin" #define MSG_LEVEL_BED_WAITING "Click to Begin"
#define MSG_LEVEL_BED_DONE "Leveling Done!" #define MSG_LEVEL_BED_DONE "Leveling Done!"
#define MSG_LEVEL_BED_CANCEL "Cancel"
#define MSG_SET_HOME_OFFSETS "Ajustar Jogo" #define MSG_SET_HOME_OFFSETS "Ajustar Jogo"
#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" #define MSG_HOME_OFFSETS_APPLIED "Offsets applied"
#define MSG_SET_ORIGIN "Ajustar orig." #define MSG_SET_ORIGIN "Ajustar orig."
@ -87,6 +86,7 @@
#define MSG_PID_D "PID-D" #define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C" #define MSG_PID_C "PID-C"
#define MSG_ACC "Acc" #define MSG_ACC "Acc"
#define MSG_JERK "Jogo"
#define MSG_VX_JERK "jogo VX" #define MSG_VX_JERK "jogo VX"
#define MSG_VY_JERK "jogo VY" #define MSG_VY_JERK "jogo VY"
#define MSG_VZ_JERK "jogo VZ" #define MSG_VZ_JERK "jogo VZ"
@ -97,6 +97,7 @@
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "Retrair A" #define MSG_A_RETRACT "Retrair A"
#define MSG_A_TRAVEL "A-movimento" #define MSG_A_TRAVEL "A-movimento"
#define MSG_STEPS_PER_MM "Passo/mm"
#define MSG_XSTEPS "Passo X/mm" #define MSG_XSTEPS "Passo X/mm"
#define MSG_YSTEPS "Passo Y/mm" #define MSG_YSTEPS "Passo Y/mm"
#define MSG_ZSTEPS "Passo Z/mm" #define MSG_ZSTEPS "Passo Z/mm"

@ -42,7 +42,6 @@
#define MSG_LEVEL_BED_HOMING _UxGT("Indo para origem") #define MSG_LEVEL_BED_HOMING _UxGT("Indo para origem")
#define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin") #define MSG_LEVEL_BED_WAITING _UxGT("Click to Begin")
#define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!") #define MSG_LEVEL_BED_DONE _UxGT("Leveling Done!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancel")
#define MSG_SET_HOME_OFFSETS _UxGT("Ajustar Jogo") #define MSG_SET_HOME_OFFSETS _UxGT("Ajustar Jogo")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets applied")
#define MSG_SET_ORIGIN _UxGT("Ajustar orig.") #define MSG_SET_ORIGIN _UxGT("Ajustar orig.")
@ -87,6 +86,7 @@
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_ACC _UxGT("Acc") #define MSG_ACC _UxGT("Acc")
#define MSG_JERK _UxGT("Jogo")
#define MSG_VX_JERK _UxGT("jogo VX") #define MSG_VX_JERK _UxGT("jogo VX")
#define MSG_VY_JERK _UxGT("jogo VY") #define MSG_VY_JERK _UxGT("jogo VY")
#define MSG_VZ_JERK _UxGT("jogo VZ") #define MSG_VZ_JERK _UxGT("jogo VZ")
@ -97,6 +97,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("Retrair A") #define MSG_A_RETRACT _UxGT("Retrair A")
#define MSG_A_TRAVEL _UxGT("A-movimento") #define MSG_A_TRAVEL _UxGT("A-movimento")
#define MSG_STEPS_PER_MM _UxGT("Passo/mm")
#define MSG_XSTEPS _UxGT("Passo X/mm") #define MSG_XSTEPS _UxGT("Passo X/mm")
#define MSG_YSTEPS _UxGT("Passo Y/mm") #define MSG_YSTEPS _UxGT("Passo Y/mm")
#define MSG_ZSTEPS _UxGT("Passo Z/mm") #define MSG_ZSTEPS _UxGT("Passo Z/mm")

@ -46,7 +46,6 @@
#define MSG_LEVEL_BED_WAITING "Click para iniciar" #define MSG_LEVEL_BED_WAITING "Click para iniciar"
#define MSG_LEVEL_BED_NEXT_POINT "Proximo ponto" #define MSG_LEVEL_BED_NEXT_POINT "Proximo ponto"
#define MSG_LEVEL_BED_DONE "Pronto !" #define MSG_LEVEL_BED_DONE "Pronto !"
#define MSG_LEVEL_BED_CANCEL "Cancelar"
#define MSG_SET_HOME_OFFSETS "Definir desvio" #define MSG_SET_HOME_OFFSETS "Definir desvio"
#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" #define MSG_HOME_OFFSETS_APPLIED "Offsets applied"
#define MSG_SET_ORIGIN "Definir origem" #define MSG_SET_ORIGIN "Definir origem"
@ -91,6 +90,7 @@
#define MSG_PID_D "PID-D" #define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C" #define MSG_PID_C "PID-C"
#define MSG_ACC "Acc" #define MSG_ACC "Acc"
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK "Vx-jerk" #define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk" #define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
@ -101,6 +101,7 @@
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#define MSG_A_RETRACT "A-retraccao" #define MSG_A_RETRACT "A-retraccao"
#define MSG_A_TRAVEL "A-movimento" #define MSG_A_TRAVEL "A-movimento"
#define MSG_STEPS_PER_MM "Passo/mm"
#define MSG_XSTEPS "X passo/mm" #define MSG_XSTEPS "X passo/mm"
#define MSG_YSTEPS "Y passo/mm" #define MSG_YSTEPS "Y passo/mm"
#define MSG_ZSTEPS "Z passo/mm" #define MSG_ZSTEPS "Z passo/mm"

@ -46,7 +46,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Click para iniciar") #define MSG_LEVEL_BED_WAITING _UxGT("Click para iniciar")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Próximo ponto") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Próximo ponto")
#define MSG_LEVEL_BED_DONE _UxGT("Pronto !") #define MSG_LEVEL_BED_DONE _UxGT("Pronto !")
#define MSG_LEVEL_BED_CANCEL _UxGT("Cancelar")
#define MSG_SET_HOME_OFFSETS _UxGT("Definir desvio") #define MSG_SET_HOME_OFFSETS _UxGT("Definir desvio")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets aplicados") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offsets aplicados")
#define MSG_SET_ORIGIN _UxGT("Definir origem") #define MSG_SET_ORIGIN _UxGT("Definir origem")
@ -91,6 +90,7 @@
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_ACC _UxGT("Acc") #define MSG_ACC _UxGT("Acc")
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-jerk") #define MSG_VX_JERK _UxGT("Vx-jerk")
#define MSG_VY_JERK _UxGT("Vy-jerk") #define MSG_VY_JERK _UxGT("Vy-jerk")
#define MSG_VZ_JERK _UxGT("Vz-jerk") #define MSG_VZ_JERK _UxGT("Vz-jerk")
@ -101,6 +101,7 @@
#define MSG_AMAX _UxGT("Amax ") #define MSG_AMAX _UxGT("Amax ")
#define MSG_A_RETRACT _UxGT("A-retracção") #define MSG_A_RETRACT _UxGT("A-retracção")
#define MSG_A_TRAVEL _UxGT("A-movimento") #define MSG_A_TRAVEL _UxGT("A-movimento")
#define MSG_STEPS_PER_MM _UxGT("Passo/mm")
#define MSG_XSTEPS _UxGT("X passo/mm") #define MSG_XSTEPS _UxGT("X passo/mm")
#define MSG_YSTEPS _UxGT("Y passo/mm") #define MSG_YSTEPS _UxGT("Y passo/mm")
#define MSG_ZSTEPS _UxGT("Z passo/mm") #define MSG_ZSTEPS _UxGT("Z passo/mm")

@ -45,7 +45,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Нажмите начать") #define MSG_LEVEL_BED_WAITING _UxGT("Нажмите начать")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Следующая точка") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Следующая точка")
#define MSG_LEVEL_BED_DONE _UxGT("Уровень!") #define MSG_LEVEL_BED_DONE _UxGT("Уровень!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Отменить")
#define MSG_SET_HOME_OFFSETS _UxGT("Запомнить парковку") #define MSG_SET_HOME_OFFSETS _UxGT("Запомнить парковку")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Коррекции примен") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Коррекции примен")
#define MSG_SET_ORIGIN _UxGT("Запомнить ноль") #define MSG_SET_ORIGIN _UxGT("Запомнить ноль")
@ -65,6 +64,7 @@
#define MSG_EXTRUDE _UxGT("Экструзия") #define MSG_EXTRUDE _UxGT("Экструзия")
#define MSG_RETRACT _UxGT("Втягивание") #define MSG_RETRACT _UxGT("Втягивание")
#define MSG_MOVE_AXIS _UxGT("Движение по осям") #define MSG_MOVE_AXIS _UxGT("Движение по осям")
#define MSG_BED_LEVELING _UxGT("Калибровать стол")
#define MSG_LEVEL_BED _UxGT("Калибровать стол") #define MSG_LEVEL_BED _UxGT("Калибровать стол")
#define MSG_MOVE_X _UxGT("Движение по X") #define MSG_MOVE_X _UxGT("Движение по X")
#define MSG_MOVE_Y _UxGT("Движение по Y") #define MSG_MOVE_Y _UxGT("Движение по Y")
@ -91,6 +91,7 @@
#define MSG_PID_D _UxGT("PID-D") #define MSG_PID_D _UxGT("PID-D")
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_ACC _UxGT("Acc") #define MSG_ACC _UxGT("Acc")
#define MSG_JERK _UxGT("Рывок")
#define MSG_VX_JERK _UxGT("Vx-рывок") #define MSG_VX_JERK _UxGT("Vx-рывок")
#define MSG_VY_JERK _UxGT("Vy-рывок") #define MSG_VY_JERK _UxGT("Vy-рывок")
#define MSG_VZ_JERK _UxGT("Vz-рывок") #define MSG_VZ_JERK _UxGT("Vz-рывок")
@ -101,6 +102,7 @@
#define MSG_AMAX _UxGT("Aмакс") #define MSG_AMAX _UxGT("Aмакс")
#define MSG_A_RETRACT _UxGT("A-втягивание") #define MSG_A_RETRACT _UxGT("A-втягивание")
#define MSG_A_TRAVEL _UxGT("A-путеш.") #define MSG_A_TRAVEL _UxGT("A-путеш.")
#define MSG_STEPS_PER_MM _UxGT("Шаг/мм")
#define MSG_XSTEPS _UxGT("X шаг/мм") #define MSG_XSTEPS _UxGT("X шаг/мм")
#define MSG_YSTEPS _UxGT("Y шаг/мм") #define MSG_YSTEPS _UxGT("Y шаг/мм")
#define MSG_ZSTEPS _UxGT("Z шаг/мм") #define MSG_ZSTEPS _UxGT("Z шаг/мм")

@ -55,7 +55,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Başlatmak için tıkla") // Başlatmak için tıkla #define MSG_LEVEL_BED_WAITING _UxGT("Başlatmak için tıkla") // Başlatmak için tıkla
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Sıradaki Nokta") // Sıradaki Nokta #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Sıradaki Nokta") // Sıradaki Nokta
#define MSG_LEVEL_BED_DONE _UxGT("Seviyeleme Tamam!") // Seviyeleme Tamam! #define MSG_LEVEL_BED_DONE _UxGT("Seviyeleme Tamam!") // Seviyeleme Tamam!
#define MSG_LEVEL_BED_CANCEL _UxGT("İptal") // İptal
#define MSG_SET_HOME_OFFSETS _UxGT("Offset Ayarla") // Offset Ayarla #define MSG_SET_HOME_OFFSETS _UxGT("Offset Ayarla") // Offset Ayarla
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Offset Tamam") // Offset Tamam #define MSG_HOME_OFFSETS_APPLIED _UxGT("Offset Tamam") // Offset Tamam
#define MSG_SET_ORIGIN _UxGT("Sıfır Belirle") // Sıfır Belirle #define MSG_SET_ORIGIN _UxGT("Sıfır Belirle") // Sıfır Belirle
@ -77,6 +76,7 @@
#define MSG_EXTRUDE _UxGT("Extrude") // Extrude #define MSG_EXTRUDE _UxGT("Extrude") // Extrude
#define MSG_RETRACT _UxGT("Geri Çek") // Geri Çek #define MSG_RETRACT _UxGT("Geri Çek") // Geri Çek
#define MSG_MOVE_AXIS _UxGT("Eksen Yönet") // Eksenleri Yönet #define MSG_MOVE_AXIS _UxGT("Eksen Yönet") // Eksenleri Yönet
#define MSG_BED_LEVELING _UxGT("Tabla Seviyele") // Tabla Seviyele
#define MSG_LEVEL_BED _UxGT("Tabla Seviyele") // Tabla Seviyele #define MSG_LEVEL_BED _UxGT("Tabla Seviyele") // Tabla Seviyele
#define MSG_MOVING _UxGT("Konumlanıyor...") // Konumlanıyor... #define MSG_MOVING _UxGT("Konumlanıyor...") // Konumlanıyor...
#define MSG_FREE_XY _UxGT("Durdur XY") // Durdur XY #define MSG_FREE_XY _UxGT("Durdur XY") // Durdur XY
@ -106,6 +106,7 @@
#define MSG_PID_C _UxGT("PID-C") // PID-C #define MSG_PID_C _UxGT("PID-C") // PID-C
#define MSG_SELECT _UxGT("Seç") // Seç #define MSG_SELECT _UxGT("Seç") // Seç
#define MSG_ACC _UxGT("İvme") // İvme #define MSG_ACC _UxGT("İvme") // İvme
#define MSG_JERK _UxGT("Jerk")
#define MSG_VX_JERK _UxGT("Vx-Jerk") // Vx-Jerk #define MSG_VX_JERK _UxGT("Vx-Jerk") // Vx-Jerk
#define MSG_VY_JERK _UxGT("Vy-Jerk") // Vy-Jerk #define MSG_VY_JERK _UxGT("Vy-Jerk") // Vy-Jerk
#define MSG_VZ_JERK _UxGT("Vz-jerk") // Vz-Jerk #define MSG_VZ_JERK _UxGT("Vz-jerk") // Vz-Jerk
@ -116,6 +117,7 @@
#define MSG_AMAX _UxGT("Amax ") // Amax #define MSG_AMAX _UxGT("Amax ") // Amax
#define MSG_A_RETRACT _UxGT("A-retract") // A-retract #define MSG_A_RETRACT _UxGT("A-retract") // A-retract
#define MSG_A_TRAVEL _UxGT("A-travel") // A-travel #define MSG_A_TRAVEL _UxGT("A-travel") // A-travel
#define MSG_STEPS_PER_MM _UxGT("Steps/mm") // Xsteps/mm
#define MSG_XSTEPS _UxGT("Xsteps/mm") // Xsteps/mm #define MSG_XSTEPS _UxGT("Xsteps/mm") // Xsteps/mm
#define MSG_YSTEPS _UxGT("Ysteps/mm") // Ysteps/mm #define MSG_YSTEPS _UxGT("Ysteps/mm") // Ysteps/mm
#define MSG_ZSTEPS _UxGT("Zsteps/mm") // Zsteps/mm #define MSG_ZSTEPS _UxGT("Zsteps/mm") // Zsteps/mm
@ -204,8 +206,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Ekstruderler") // Ekstruderler #define MSG_INFO_EXTRUDERS _UxGT("Ekstruderler") // Ekstruderler
#define MSG_INFO_BAUDRATE _UxGT("İletişim Hızı") // İletişim Hızı #define MSG_INFO_BAUDRATE _UxGT("İletişim Hızı") // İletişim Hızı
#define MSG_INFO_PROTOCOL _UxGT("Protokol") // Protokol #define MSG_INFO_PROTOCOL _UxGT("Protokol") // Protokol
#define MSG_LIGHTS_ON _UxGT("Aydınlatmayı Aç") // Aydınlatmayı #define MSG_CASE_LIGHT _UxGT("Aydınlatmayı") // Aydınlatmayı
#define MSG_LIGHTS_OFF _UxGT("Aydınlatmayı Kapa") // Aydınlaymayı Kapa
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("Baskı Sayısı") // Baskı Sayısı #define MSG_INFO_PRINT_COUNT _UxGT("Baskı Sayısı") // Baskı Sayısı
@ -227,8 +228,8 @@
#define MSG_DRIVE_STRENGTH _UxGT("Sürücü Gücü") // Sürücü Gücü #define MSG_DRIVE_STRENGTH _UxGT("Sürücü Gücü") // Sürücü Gücü
#define MSG_DAC_PERCENT _UxGT("Sürücü %") // Sürücü % #define MSG_DAC_PERCENT _UxGT("Sürücü %") // Sürücü %
#define MSG_DAC_EEPROM_WRITE _UxGT("DAC'ı EEPROM'a Yaz") // DAC'ı EEPROM'a Yaz #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("Filaman Değiştir") // Filaman Değiştir #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Seçenekler:") // Seçenekler: #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("Seçenekler:") // Seçenekler:
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Daha Akıt") // Daha Akıt #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Daha Akıt") // Daha Akıt
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Baskıyı sürdür") // Baskıyı sürdür #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Baskıyı sürdür") // Baskıyı sürdür

@ -48,7 +48,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("Почати") #define MSG_LEVEL_BED_WAITING _UxGT("Почати")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Слідуюча Точка") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Слідуюча Точка")
#define MSG_LEVEL_BED_DONE _UxGT("Завершено!") #define MSG_LEVEL_BED_DONE _UxGT("Завершено!")
#define MSG_LEVEL_BED_CANCEL _UxGT("Відміна")
#define MSG_SET_HOME_OFFSETS _UxGT("Зберегти паркув.") #define MSG_SET_HOME_OFFSETS _UxGT("Зберегти паркув.")
#define MSG_HOME_OFFSETS_APPLIED _UxGT("Зміщення застос.") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Зміщення застос.")
#define MSG_SET_ORIGIN _UxGT("Встанов. початок") #define MSG_SET_ORIGIN _UxGT("Встанов. початок")
@ -68,6 +67,7 @@
#define MSG_EXTRUDE _UxGT("Екструзія") #define MSG_EXTRUDE _UxGT("Екструзія")
#define MSG_RETRACT _UxGT("Втягування") #define MSG_RETRACT _UxGT("Втягування")
#define MSG_MOVE_AXIS _UxGT("Рух по осям") #define MSG_MOVE_AXIS _UxGT("Рух по осям")
#define MSG_BED_LEVELING _UxGT("Нівелювання столу")
#define MSG_LEVEL_BED _UxGT("Нівелювання столу") #define MSG_LEVEL_BED _UxGT("Нівелювання столу")
#define MSG_MOVE_X _UxGT("Рух по X") #define MSG_MOVE_X _UxGT("Рух по X")
#define MSG_MOVE_Y _UxGT("Рух по Y") #define MSG_MOVE_Y _UxGT("Рух по Y")
@ -95,6 +95,7 @@
#define MSG_PID_C _UxGT("PID-C") #define MSG_PID_C _UxGT("PID-C")
#define MSG_SELECT _UxGT("Вибрати") #define MSG_SELECT _UxGT("Вибрати")
#define MSG_ACC _UxGT("Приск.") #define MSG_ACC _UxGT("Приск.")
#define MSG_JERK _UxGT("Ривок")
#define MSG_VX_JERK _UxGT("Vx-ривок") #define MSG_VX_JERK _UxGT("Vx-ривок")
#define MSG_VY_JERK _UxGT("Vy-ривок") #define MSG_VY_JERK _UxGT("Vy-ривок")
#define MSG_VZ_JERK _UxGT("Vz-ривок") #define MSG_VZ_JERK _UxGT("Vz-ривок")
@ -105,6 +106,7 @@
#define MSG_AMAX _UxGT("Aмакс ") #define MSG_AMAX _UxGT("Aмакс ")
#define MSG_A_RETRACT _UxGT("A-втягув.") #define MSG_A_RETRACT _UxGT("A-втягув.")
#define MSG_A_TRAVEL _UxGT("A-руху") #define MSG_A_TRAVEL _UxGT("A-руху")
#define MSG_STEPS_PER_MM _UxGT("Кроків/мм")
#define MSG_XSTEPS _UxGT("Xкроків/мм") #define MSG_XSTEPS _UxGT("Xкроків/мм")
#define MSG_YSTEPS _UxGT("Yкроків/мм") #define MSG_YSTEPS _UxGT("Yкроків/мм")
#define MSG_ZSTEPS _UxGT("Zкроків/мм") #define MSG_ZSTEPS _UxGT("Zкроків/мм")
@ -178,8 +180,7 @@
#define MSG_INFO_EXTRUDERS _UxGT("Екструдери") #define MSG_INFO_EXTRUDERS _UxGT("Екструдери")
#define MSG_INFO_BAUDRATE _UxGT("біт/с") #define MSG_INFO_BAUDRATE _UxGT("біт/с")
#define MSG_INFO_PROTOCOL _UxGT("Протокол") #define MSG_INFO_PROTOCOL _UxGT("Протокол")
#define MSG_LIGHTS_ON _UxGT("Підсвітка увік.") #define MSG_CASE_LIGHT _UxGT("Підсвітка")
#define MSG_LIGHTS_OFF _UxGT("Підсвітка вимк.")
#if LCD_WIDTH >= 20 #if LCD_WIDTH >= 20
#define MSG_INFO_PRINT_COUNT _UxGT("К-сть друків") #define MSG_INFO_PRINT_COUNT _UxGT("К-сть друків")
@ -203,8 +204,8 @@
#define MSG_DAC_PERCENT _UxGT("% мотору") #define MSG_DAC_PERCENT _UxGT("% мотору")
#define MSG_DAC_EEPROM_WRITE _UxGT("Запис ЦАП на ПЗП") #define MSG_DAC_EEPROM_WRITE _UxGT("Запис ЦАП на ПЗП")
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("ЗАМІНА ВОЛОКНА") #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("НАЛАШТ. ЗАМІНИ:") #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Екструдувати") #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("Екструдувати")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Відновити друк") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Відновити друк")

@ -45,7 +45,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("单击开始热床调平") //"Click to Begin" #define MSG_LEVEL_BED_WAITING _UxGT("单击开始热床调平") //"Click to Begin"
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("下个热床调平点") //"Next Point" #define MSG_LEVEL_BED_NEXT_POINT _UxGT("下个热床调平点") //"Next Point"
#define MSG_LEVEL_BED_DONE _UxGT("完成热床调平") //"Leveling Done!" #define MSG_LEVEL_BED_DONE _UxGT("完成热床调平") //"Leveling Done!"
#define MSG_LEVEL_BED_CANCEL _UxGT("取消热床调平") //"Cancel"
#define MSG_SET_HOME_OFFSETS _UxGT("设置原点偏移") //"Set home offsets" #define MSG_SET_HOME_OFFSETS _UxGT("设置原点偏移") //"Set home offsets"
#define MSG_HOME_OFFSETS_APPLIED _UxGT("偏移已启用") //"Offsets applied" #define MSG_HOME_OFFSETS_APPLIED _UxGT("偏移已启用") //"Offsets applied"
#define MSG_SET_ORIGIN _UxGT("设置原点") //"Set origin" #define MSG_SET_ORIGIN _UxGT("设置原点") //"Set origin"
@ -65,6 +64,7 @@
#define MSG_EXTRUDE _UxGT("挤出") //"Extrude" #define MSG_EXTRUDE _UxGT("挤出") //"Extrude"
#define MSG_RETRACT _UxGT("回抽") //"Retract" #define MSG_RETRACT _UxGT("回抽") //"Retract"
#define MSG_MOVE_AXIS _UxGT("移动轴") //"Move axis" #define MSG_MOVE_AXIS _UxGT("移动轴") //"Move axis"
#define MSG_BED_LEVELING _UxGT("调平热床") //"Bed leveling"
#define MSG_LEVEL_BED _UxGT("调平热床") //"Level bed" #define MSG_LEVEL_BED _UxGT("调平热床") //"Level bed"
#define MSG_MOVE_X _UxGT("移动X") //"Move X" #define MSG_MOVE_X _UxGT("移动X") //"Move X"
#define MSG_MOVE_Y _UxGT("移动Y") //"Move Y" #define MSG_MOVE_Y _UxGT("移动Y") //"Move Y"
@ -92,6 +92,7 @@
#define MSG_PID_C _UxGT("PID-C") //"PID-C" #define MSG_PID_C _UxGT("PID-C") //"PID-C"
#define MSG_SELECT _UxGT("选择") //"Select" #define MSG_SELECT _UxGT("选择") //"Select"
#define MSG_ACC _UxGT("加速度") //"Accel" acceleration #define MSG_ACC _UxGT("加速度") //"Accel" acceleration
#define MSG_JERK _UxGT("抖动速率") // "Jerk"
#define MSG_VX_JERK _UxGT("X轴抖动速率") //"Vx-jerk" #define MSG_VX_JERK _UxGT("X轴抖动速率") //"Vx-jerk"
#define MSG_VY_JERK _UxGT("Y轴抖动速率") //"Vy-jerk" #define MSG_VY_JERK _UxGT("Y轴抖动速率") //"Vy-jerk"
#define MSG_VZ_JERK _UxGT("Z轴抖动速率") //"Vz-jerk" #define MSG_VZ_JERK _UxGT("Z轴抖动速率") //"Vz-jerk"
@ -102,6 +103,7 @@
#define MSG_AMAX _UxGT("最大打印加速度") //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves #define MSG_AMAX _UxGT("最大打印加速度") //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves
#define MSG_A_RETRACT _UxGT("收进加速度") //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts #define MSG_A_RETRACT _UxGT("收进加速度") //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts
#define MSG_A_TRAVEL _UxGT("非打印移动加速度") //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define MSG_A_TRAVEL _UxGT("非打印移动加速度") //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
#define MSG_STEPS_PER_MM _UxGT("轴步数/mm") //"Steps/mm" axis_steps_per_mm, axis steps-per-unit G92
#define MSG_XSTEPS _UxGT("X轴步数/mm") //"Xsteps/mm" axis_steps_per_mm, axis steps-per-unit G92 #define MSG_XSTEPS _UxGT("X轴步数/mm") //"Xsteps/mm" axis_steps_per_mm, axis steps-per-unit G92
#define MSG_YSTEPS _UxGT("Y轴步数/mm") //"Ysteps/mm" #define MSG_YSTEPS _UxGT("Y轴步数/mm") //"Ysteps/mm"
#define MSG_ZSTEPS _UxGT("Z轴步数/mm") //"Zsteps/mm" #define MSG_ZSTEPS _UxGT("Z轴步数/mm") //"Zsteps/mm"
@ -199,8 +201,8 @@
#define MSG_INFO_MAX_TEMP _UxGT("最高温度") //"Max Temp" #define MSG_INFO_MAX_TEMP _UxGT("最高温度") //"Max Temp"
#define MSG_INFO_PSU _UxGT("电源供应") //"Power Supply" #define MSG_INFO_PSU _UxGT("电源供应") //"Power Supply"
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("修改丝料") //"CHANGE FILAMENT" #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("修改选项:") //"CHANGE OPTIONS:" #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("挤出更多") //"Extrude more" #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("挤出更多") //"Extrude more"
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("恢复打印") //"Resume print" #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("恢复打印") //"Resume print"

@ -45,7 +45,6 @@
#define MSG_LEVEL_BED_WAITING _UxGT("單擊開始熱床調平") //"Click to Begin" #define MSG_LEVEL_BED_WAITING _UxGT("單擊開始熱床調平") //"Click to Begin"
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("下個熱床調平點") //"Next Point" #define MSG_LEVEL_BED_NEXT_POINT _UxGT("下個熱床調平點") //"Next Point"
#define MSG_LEVEL_BED_DONE _UxGT("完成熱床調平") //"Leveling Done!" #define MSG_LEVEL_BED_DONE _UxGT("完成熱床調平") //"Leveling Done!"
#define MSG_LEVEL_BED_CANCEL _UxGT("取消熱床調平") //"Cancel"
#define MSG_SET_HOME_OFFSETS _UxGT("設置原點偏移") //"Set home offsets" #define MSG_SET_HOME_OFFSETS _UxGT("設置原點偏移") //"Set home offsets"
#define MSG_HOME_OFFSETS_APPLIED _UxGT("偏移已啟用") //"Offsets applied" #define MSG_HOME_OFFSETS_APPLIED _UxGT("偏移已啟用") //"Offsets applied"
#define MSG_SET_ORIGIN _UxGT("設置原點") //"Set origin" #define MSG_SET_ORIGIN _UxGT("設置原點") //"Set origin"
@ -65,6 +64,7 @@
#define MSG_EXTRUDE _UxGT("擠出") //"Extrude" #define MSG_EXTRUDE _UxGT("擠出") //"Extrude"
#define MSG_RETRACT _UxGT("回抽") //"Retract" #define MSG_RETRACT _UxGT("回抽") //"Retract"
#define MSG_MOVE_AXIS _UxGT("移動軸") //"Move axis" #define MSG_MOVE_AXIS _UxGT("移動軸") //"Move axis"
#define MSG_BED_LEVELING _UxGT("調平熱床") //"Bed leveling"
#define MSG_LEVEL_BED _UxGT("調平熱床") //"Level bed" #define MSG_LEVEL_BED _UxGT("調平熱床") //"Level bed"
#define MSG_MOVE_X _UxGT("移動X") //"Move X" #define MSG_MOVE_X _UxGT("移動X") //"Move X"
#define MSG_MOVE_Y _UxGT("移動Y") //"Move Y" #define MSG_MOVE_Y _UxGT("移動Y") //"Move Y"
@ -92,6 +92,7 @@
#define MSG_PID_C _UxGT("PID-C") //"PID-C" #define MSG_PID_C _UxGT("PID-C") //"PID-C"
#define MSG_SELECT _UxGT("選擇") //"Select" #define MSG_SELECT _UxGT("選擇") //"Select"
#define MSG_ACC _UxGT("加速度") //"Accel" acceleration #define MSG_ACC _UxGT("加速度") //"Accel" acceleration
#define MSG_JERK _UxGT("抖動速率") //"Jerk"
#define MSG_VX_JERK _UxGT("X軸抖動速率") //"Vx-jerk" #define MSG_VX_JERK _UxGT("X軸抖動速率") //"Vx-jerk"
#define MSG_VY_JERK _UxGT("Y軸抖動速率") //"Vy-jerk" #define MSG_VY_JERK _UxGT("Y軸抖動速率") //"Vy-jerk"
#define MSG_VZ_JERK _UxGT("Z軸抖動速率") //"Vz-jerk" #define MSG_VZ_JERK _UxGT("Z軸抖動速率") //"Vz-jerk"
@ -102,6 +103,7 @@
#define MSG_AMAX _UxGT("最大列印加速度") //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves #define MSG_AMAX _UxGT("最大列印加速度") //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves
#define MSG_A_RETRACT _UxGT("收進加速度") //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts #define MSG_A_RETRACT _UxGT("收進加速度") //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts
#define MSG_A_TRAVEL _UxGT("非列印移動加速度") //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves #define MSG_A_TRAVEL _UxGT("非列印移動加速度") //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
#define MSG_STEPS_PER_MM _UxGT("軸步數/mm") //"Steps/mm" axis_steps_per_mm, axis steps-per-unit G92
#define MSG_XSTEPS _UxGT("X軸步數/mm") //"Xsteps/mm" axis_steps_per_mm, axis steps-per-unit G92 #define MSG_XSTEPS _UxGT("X軸步數/mm") //"Xsteps/mm" axis_steps_per_mm, axis steps-per-unit G92
#define MSG_YSTEPS _UxGT("Y軸步數/mm") //"Ysteps/mm" #define MSG_YSTEPS _UxGT("Y軸步數/mm") //"Ysteps/mm"
#define MSG_ZSTEPS _UxGT("Z軸步數/mm") //"Zsteps/mm" #define MSG_ZSTEPS _UxGT("Z軸步數/mm") //"Zsteps/mm"
@ -199,8 +201,8 @@
#define MSG_INFO_MAX_TEMP _UxGT("最高溫度") //"Max Temp" #define MSG_INFO_MAX_TEMP _UxGT("最高溫度") //"Max Temp"
#define MSG_INFO_PSU _UxGT("電源供應") //"Power Supply" #define MSG_INFO_PSU _UxGT("電源供應") //"Power Supply"
#define MSG_FILAMENT_CHANGE_HEADER _UxGT("修改絲料") //"CHANGE FILAMENT" #define MSG_FILAMENT_CHANGE_HEADER _UxGT("PRINT PAUSED")
#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("修改選項:") //"CHANGE OPTIONS:" #define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("RESUME OPTIONS:")
#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("擠出更多") //"Extrude more" #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE _UxGT("擠出更多") //"Extrude more"
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("恢複列印") //"Resume print" #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("恢複列印") //"Resume print"

@ -41,27 +41,12 @@
#include "least_squares_fit.h" #include "least_squares_fit.h"
void incremental_LSF_reset(struct linear_fit_data *lsf) { int finish_incremental_LSF(struct linear_fit_data *lsf) {
memset(lsf, 0, sizeof(linear_fit_data));
}
void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) { const float N = lsf->N;
lsf->xbar += x;
lsf->ybar += y;
lsf->zbar += z;
lsf->x2bar += sq(x);
lsf->y2bar += sq(y);
lsf->z2bar += sq(z);
lsf->xybar += x * y;
lsf->xzbar += x * z;
lsf->yzbar += y * z;
lsf->max_absx = max(fabs(x), lsf->max_absx);
lsf->max_absy = max(fabs(y), lsf->max_absy);
lsf->n++;
}
int finish_incremental_LSF(struct linear_fit_data *lsf) { if (N == 0.0)
const float N = (float)lsf->n; return 1;
lsf->xbar /= N; lsf->xbar /= N;
lsf->ybar /= N; lsf->ybar /= N;

@ -41,16 +41,49 @@
#include <math.h> #include <math.h>
struct linear_fit_data { struct linear_fit_data {
int n;
float xbar, ybar, zbar, float xbar, ybar, zbar,
x2bar, y2bar, z2bar, x2bar, y2bar, z2bar,
xybar, xzbar, yzbar, xybar, xzbar, yzbar,
max_absx, max_absy, max_absx, max_absy,
A, B, D; A, B, D, N;
}; };
void incremental_LSF_reset(struct linear_fit_data *); void inline incremental_LSF_reset(struct linear_fit_data *lsf) {
void incremental_LSF(struct linear_fit_data *, float x, float y, float z); memset(lsf, 0, sizeof(linear_fit_data));
}
void inline incremental_WLSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z, const float &w) {
// weight each accumulator by factor w, including the "number" of samples
// (analagous to calling inc_LSF twice with same values to weight it by 2X)
lsf->xbar += w * x;
lsf->ybar += w * y;
lsf->zbar += w * z;
lsf->x2bar += w * x * x; // don't use sq(x) -- let compiler re-use w*x four times
lsf->y2bar += w * y * y;
lsf->z2bar += w * z * z;
lsf->xybar += w * x * y;
lsf->xzbar += w * x * z;
lsf->yzbar += w * y * z;
lsf->N += w;
lsf->max_absx = max(fabs(w * x), lsf->max_absx);
lsf->max_absy = max(fabs(w * y), lsf->max_absy);
}
void inline incremental_LSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z) {
lsf->xbar += x;
lsf->ybar += y;
lsf->zbar += z;
lsf->x2bar += sq(x);
lsf->y2bar += sq(y);
lsf->z2bar += sq(z);
lsf->xybar += x * y;
lsf->xzbar += x * z;
lsf->yzbar += y * z;
lsf->max_absx = max(fabs(x), lsf->max_absx);
lsf->max_absy = max(fabs(y), lsf->max_absy);
lsf->N += 1.0;
}
int finish_incremental_LSF(struct linear_fit_data *); int finish_incremental_LSF(struct linear_fit_data *);
#endif #endif

@ -29,6 +29,12 @@
#define XYZ 3 #define XYZ 3
#define FORCE_INLINE __attribute__((always_inline)) inline #define FORCE_INLINE __attribute__((always_inline)) inline
#define _UNUSED __attribute__((unused))
#define _O0 __attribute__((optimize("O0")))
#define _Os __attribute__((optimize("Os")))
#define _O1 __attribute__((optimize("O1")))
#define _O2 __attribute__((optimize("O2")))
#define _O3 __attribute__((optimize("O3")))
// Bracket code that shouldn't be interrupted // Bracket code that shouldn't be interrupted
#ifndef CRITICAL_SECTION_START #ifndef CRITICAL_SECTION_START
@ -118,7 +124,10 @@
#define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H)) #define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
#define NUMERIC(a) WITHIN(a, '0', '9') #define NUMERIC(a) WITHIN(a, '0', '9')
#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-') #define DECIMAL(a) (NUMERIC(a) || a == '.')
#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-' || (a) == '+')
#define DECIMAL_SIGNED(a) (DECIMAL(a) || (a) == '-' || (a) == '+')
#define PRINTABLE(C) (((C) & 0xC0u) != 0x80u)
#define COUNT(a) (sizeof(a)/sizeof(*a)) #define COUNT(a) (sizeof(a)/sizeof(*a))
#define ZERO(a) memset(a,0,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)))

@ -12,9 +12,9 @@
* @param strokes number of strokes to execute * @param strokes number of strokes to execute
*/ */
void Nozzle::stroke( void Nozzle::stroke(
__attribute__((unused)) point_t const &start, _UNUSED point_t const &start,
__attribute__((unused)) point_t const &end, _UNUSED point_t const &end,
__attribute__((unused)) uint8_t const &strokes _UNUSED uint8_t const &strokes
) { ) {
#if ENABLED(NOZZLE_CLEAN_FEATURE) #if ENABLED(NOZZLE_CLEAN_FEATURE)
@ -56,10 +56,10 @@ void Nozzle::stroke(
* @param objects number of objects to create * @param objects number of objects to create
*/ */
void Nozzle::zigzag( void Nozzle::zigzag(
__attribute__((unused)) point_t const &start, _UNUSED point_t const &start,
__attribute__((unused)) point_t const &end, _UNUSED point_t const &end,
__attribute__((unused)) uint8_t const &strokes, _UNUSED uint8_t const &strokes,
__attribute__((unused)) uint8_t const &objects _UNUSED uint8_t const &objects
) { ) {
#if ENABLED(NOZZLE_CLEAN_FEATURE) #if ENABLED(NOZZLE_CLEAN_FEATURE)
const float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length, // [twice the] Amplitude const float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length, // [twice the] Amplitude
@ -114,10 +114,10 @@ void Nozzle::zigzag(
* @param radius radius of circle * @param radius radius of circle
*/ */
void Nozzle::circle( void Nozzle::circle(
__attribute__((unused)) point_t const &start, _UNUSED point_t const &start,
__attribute__((unused)) point_t const &middle, _UNUSED point_t const &middle,
__attribute__((unused)) uint8_t const &strokes, _UNUSED uint8_t const &strokes,
__attribute__((unused)) float const &radius _UNUSED float const &radius
) { ) {
#if ENABLED(NOZZLE_CLEAN_FEATURE) #if ENABLED(NOZZLE_CLEAN_FEATURE)
if (strokes == 0) return; if (strokes == 0) return;
@ -177,10 +177,10 @@ void Nozzle::circle(
* @param argument depends on the cleaning pattern * @param argument depends on the cleaning pattern
*/ */
void Nozzle::clean( void Nozzle::clean(
__attribute__((unused)) uint8_t const &pattern, _UNUSED uint8_t const &pattern,
__attribute__((unused)) uint8_t const &strokes, _UNUSED uint8_t const &strokes,
__attribute__((unused)) float const &radius, _UNUSED float const &radius,
__attribute__((unused)) uint8_t const &objects _UNUSED uint8_t const &objects
) { ) {
#if ENABLED(NOZZLE_CLEAN_FEATURE) #if ENABLED(NOZZLE_CLEAN_FEATURE)
#if ENABLED(DELTA) #if ENABLED(DELTA)
@ -209,7 +209,7 @@ void Nozzle::clean(
} }
void Nozzle::park( void Nozzle::park(
__attribute__((unused)) uint8_t const &z_action _UNUSED uint8_t const &z_action
) { ) {
#if ENABLED(NOZZLE_PARK_FEATURE) #if ENABLED(NOZZLE_PARK_FEATURE)
float const z = current_position[Z_AXIS]; float const z = current_position[Z_AXIS];

@ -50,10 +50,10 @@ class Nozzle {
* @param strokes number of strokes to execute * @param strokes number of strokes to execute
*/ */
static void stroke( static void stroke(
__attribute__((unused)) point_t const &start, _UNUSED point_t const &start,
__attribute__((unused)) point_t const &end, _UNUSED point_t const &end,
__attribute__((unused)) uint8_t const &strokes _UNUSED uint8_t const &strokes
) __attribute__((optimize ("Os"))); ) _Os;
/** /**
* @brief Zig-zag clean pattern * @brief Zig-zag clean pattern
@ -65,11 +65,11 @@ class Nozzle {
* @param objects number of objects to create * @param objects number of objects to create
*/ */
static void zigzag( static void zigzag(
__attribute__((unused)) point_t const &start, _UNUSED point_t const &start,
__attribute__((unused)) point_t const &end, _UNUSED point_t const &end,
__attribute__((unused)) uint8_t const &strokes, _UNUSED uint8_t const &strokes,
__attribute__((unused)) uint8_t const &objects _UNUSED uint8_t const &objects
) __attribute__((optimize ("Os"))); ) _Os;
/** /**
* @brief Circular clean pattern * @brief Circular clean pattern
@ -80,11 +80,11 @@ class Nozzle {
* @param radius radius of circle * @param radius radius of circle
*/ */
static void circle( static void circle(
__attribute__((unused)) point_t const &start, _UNUSED point_t const &start,
__attribute__((unused)) point_t const &middle, _UNUSED point_t const &middle,
__attribute__((unused)) uint8_t const &strokes, _UNUSED uint8_t const &strokes,
__attribute__((unused)) float const &radius _UNUSED float const &radius
) __attribute__((optimize ("Os"))); ) _Os;
public: public:
/** /**
@ -95,15 +95,15 @@ class Nozzle {
* @param argument depends on the cleaning pattern * @param argument depends on the cleaning pattern
*/ */
static void clean( static void clean(
__attribute__((unused)) uint8_t const &pattern, _UNUSED uint8_t const &pattern,
__attribute__((unused)) uint8_t const &strokes, _UNUSED uint8_t const &strokes,
__attribute__((unused)) float const &radius, _UNUSED float const &radius,
__attribute__((unused)) uint8_t const &objects = 0 _UNUSED uint8_t const &objects = 0
) __attribute__((optimize ("Os"))); ) _Os;
static void park( static void park(
__attribute__((unused)) uint8_t const &z_action _UNUSED uint8_t const &z_action
) __attribute__((optimize ("Os"))); ) _Os;
}; };
#endif #endif

@ -357,7 +357,7 @@ static void pwm_details(uint8_t pin) {
// on pins that have two PWMs, print info on second PWM // on pins that have two PWMs, print info on second PWM
#if AVR_ATmega2560_FAMILY || AVR_AT90USB1286_FAMILY #if AVR_ATmega2560_FAMILY || AVR_AT90USB1286_FAMILY
// looking for port B7 - PWMs 0A and 1C // looking for port B7 - PWMs 0A and 1C
if ( ('B' == digitalPinToPort(pin) + 64) && (0x80 == digitalPinToBitMask(pin))) { if (digitalPinToPort(pin) == 2 && digitalPinToBitMask(pin) == 0x80) {
#ifndef TEENSYDUINO_IDE #ifndef TEENSYDUINO_IDE
SERIAL_PROTOCOLPGM("\n ."); SERIAL_PROTOCOLPGM("\n .");
SERIAL_PROTOCOL_SP(18); SERIAL_PROTOCOL_SP(18);

@ -515,8 +515,8 @@
#if PIN_EXISTS(SPINDLE_LASER_ENABLE) #if PIN_EXISTS(SPINDLE_LASER_ENABLE)
REPORT_NAME_DIGITAL(SPINDLE_LASER_ENABLE_PIN, __LINE__ ) REPORT_NAME_DIGITAL(SPINDLE_LASER_ENABLE_PIN, __LINE__ )
#endif #endif
#if PIN_EXISTS(SPINDLE_SPEED_LASER_POWER) #if PIN_EXISTS(SPINDLE_LASER_PWM)
REPORT_NAME_DIGITAL(SPINDLE_SPEED_LASER_POWER_PIN, __LINE__ ) REPORT_NAME_DIGITAL(SPINDLE_LASER_PWM_PIN, __LINE__ )
#endif #endif
#if PIN_EXISTS(SR_CLK) #if PIN_EXISTS(SR_CLK)
REPORT_NAME_DIGITAL(SR_CLK_PIN, __LINE__ ) REPORT_NAME_DIGITAL(SR_CLK_PIN, __LINE__ )

@ -43,6 +43,8 @@
#define RAMPS_D9_PIN 8 #define RAMPS_D9_PIN 8
#define MOSFET_D_PIN 12 #define MOSFET_D_PIN 12
#define CASE_LIGHT_PIN -1 // MUST BE HARDWARE PWM but one is not available on expansion header
#include "pins_RAMPS.h" #include "pins_RAMPS.h"
// //
@ -104,3 +106,58 @@
#define BEEPER_PIN 33 #define BEEPER_PIN 33
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
/**
* M3/M4/M5 - Spindle/Laser Control
*
* If you want to control the speed of your spindle then you'll have
* have to sacrifce the Extruder and pull some signals off the Z stepper
* driver socket.
*
* The following assumes:
* - the Z stepper driver socket is empty
* - the extruder driver socket has a driver board plugged into it
* - the Z stepper wires are attached the the extruder connector
*
* If you want to keep the extruder AND don't have a LCD display then
* you can still control the power on/off and spindle direction.
*
* Where to get spindle signals
*
* stepper signal socket name socket name
* -------
* SPINDLE_LASER_ENABLE_PIN /ENABLE O| |O VMOT
* MS1 O| |O GND
* MS2 O| |O 2B
* MS3 O| |O 2A
* /RESET O| |O 1A
* /SLEEP O| |O 1B
* SPINDLE_LASER_PWM_PIN STEP O| |O VDD
* SPINDLE_DIR_PIN DIR O| |O GND
* -------
*
* Note: Socket names vary from vendor to vendor
*/
#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are not good with 3DRAG
#undef SPINDLE_LASER_ENABLE_PIN
#undef SPINDLE_DIR_PIN
#if ENABLED(SPINDLE_LASER_ENABLE)
#if !EXTRUDERS
#undef E0_DIR_PIN
#undef E0_ENABLE_PIN
#undef E0_STEP_PIN
#undef Z_DIR_PIN
#undef Z_ENABLE_PIN
#undef Z_STEP_PIN
#define Z_DIR_PIN 28
#define Z_ENABLE_PIN 24
#define Z_STEP_PIN 26
#define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 48
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use
#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown!
#define SPINDLE_DIR_PIN 17
#endif
#endif

@ -24,12 +24,20 @@
* AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
*/ */
#ifndef __AVR_ATmega2560__
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
#endif
#if HOTENDS > 2 || E_STEPPERS > 2 #if HOTENDS > 2 || E_STEPPERS > 2
#error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue." #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif #endif
#define BOARD_NAME "Azteeg X3" #define BOARD_NAME "Azteeg X3"
#if !PIN_EXISTS(CASE_LIGHT) // doesn't already exist so OK to change the definition coming
#define OK_TO_CHANGE_CASE_LIGHT // in from from the include file
#endif
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
// //
@ -63,3 +71,30 @@
#define STAT_LED_BLUE_PIN 11 #define STAT_LED_BLUE_PIN 11
#endif #endif
//
// Misc
//
#if ENABLED(OK_TO_CHANGE_CASE_LIGHT) && STAT_LED_RED_PIN == 6
#undef STAT_LED_RED_PIN
#undef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 6 // open collector FET driver
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are no good with the AzteegX3 board
#undef SPINDLE_LASER_ENABLE_PIN
#undef SPINDLE_DIR_PIN
#if ENABLED(SPINDLE_LASER_ENABLE)
#undef SDA // use EXP3 header
#undef SCL
#if SERVO0_PIN == 7
#undef SERVO0_PIN
#def SERVO0_PIN 11
#define SPINDLE_LASER_PWM_PIN 7 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 21
#endif

@ -30,8 +30,16 @@
#define BOARD_NAME "Azteeg X3 Pro" #define BOARD_NAME "Azteeg X3 Pro"
#if !PIN_EXISTS(CASE_LIGHT) // doesn't already exist so OK to change the definition coming
#define OK_TO_CHANGE_CASE_LIGHT // in from from the include file
#endif
#include "pins_RAMPS.h" #include "pins_RAMPS.h"
#ifndef __AVR_ATmega2560__
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
#endif
// //
// Servos // Servos
// //
@ -126,7 +134,39 @@
#if ENABLED(VIKI2) || ENABLED(miniVIKI) #if ENABLED(VIKI2) || ENABLED(miniVIKI)
#undef SD_DETECT_PIN #undef SD_DETECT_PIN
#define SD_DETECT_PIN 49 // For easy adapter board #define SD_DETECT_PIN 49 // For easy adapter board
#undef BEEPER_PIN
#define BEEPER_PIN 12 // 33 isn't physically available to the LCD display
#else #else
#define STAT_LED_RED_PIN 32 #define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35 #define STAT_LED_BLUE_PIN 35
#endif #endif
//
// Misc. Functions
//
#if ENABLED(OK_TO_CHANGE_CASE_LIGHT)
#undef DOGLCD_A0 // steal pin 44 for the case light; if you have a Viki2 and have connected it
#define DOGLCD_A0 57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments
// as the wiring diagram uses pin 44 for DOGLCD_A0
#undef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 44 // must have a hardware PWM
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are no good with the AzteegX3 board
#undef SPINDLE_LASER_ENABLE_PIN
#undef SPINDLE_DIR_PIN
#if ENABLED(SPINDLE_LASER_ENABLE) // use EXP2 header
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#undef BTN_EN2
#define BTN_EN2 31 // need 7 for the spindle speed PWM
#endif
#define SPINDLE_LASER_PWM_PIN 7 // must have a hardware PWM
#define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 21
#endif

@ -30,6 +30,13 @@
#define BOARD_NAME "2PrintBeta Due" #define BOARD_NAME "2PrintBeta Due"
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 66 // Pin should have a pullup/pulldown!
#define SPINDLE_DIR_PIN 67
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
#include "pins_RAMPS.h" #include "pins_RAMPS.h"
// //

@ -46,6 +46,18 @@
#define ORIG_E2_AUTO_FAN_PIN 6 #define ORIG_E2_AUTO_FAN_PIN 6
#define ORIG_E3_AUTO_FAN_PIN 6 #define ORIG_E3_AUTO_FAN_PIN 6
//
// Misc. Functions
//
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 42
#include "pins_RAMPS_13.h" #include "pins_RAMPS_13.h"
// //

@ -27,6 +27,40 @@
* https://github.com/unrepentantgeek/brainwave-arduino * https://github.com/unrepentantgeek/brainwave-arduino
*/ */
/**
* Rev B 16 JAN 2017
*
* Added pointer to a currently available Arduino IDE extension that will
* allow this board to use the latest Marlin software
*/
/**
* Marlin_AT90USB - https://github.com/Bob-the-Kuhn/Marlin_AT90USB
* This is the only known IDE extension that is compatible with the pin definitions
* in this file, Adrduino 1.6.12 and the latest mainstream Marlin software.
*
* "Marlin_AT90USB" makes PWM0A available rather than the usual PWM1C. These PWMs share
* the same physical pin. Marlin uses TIMER1 to generate interrupts and sets it up such
* that PWM1A, PWM1B & PWM1C can't be used.
*
* Installation:
*
* 1. In the Arduino IDE, under Files -> Preferences paste the following URL
* https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
* 2. Under Tools -> Board -> Boards manager, scroll to the bottom, click on MARLIN_AT90USB
* and then click on "Install"
* 3. Select "AT90USB646_STANDARD" from the 'Tools -> Boards' menu.
*/
/**
* To burn the bootloader that comes with Marlin_AT90USB:
*
* 1. Connect your programmer to the board.
* 2. In Arduino IDE select "AT90USB646_STANDARD" and then select the programmer.
* 3. In Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
* 4. The programmer is no longer needed. Remove it.
*/
#ifndef __AVR_AT90USB646__ #ifndef __AVR_AT90USB646__
#error "Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu."
#endif #endif

@ -27,14 +27,70 @@
* https://github.com/unrepentantgeek/brainwave-arduino * https://github.com/unrepentantgeek/brainwave-arduino
*/ */
/**
* Rev B 16 JAN 2017
*
* Added pointers to currently available Arduino IDE extensions that will
* allow this board to use the latest Marlin software
*/
/**
* There are three Arduino IDE extensions that are compatible with this board
* and with the mainstream Marlin software. All have been used with Arduino 1.6.12
*
* Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
* Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
*
* Installation instructions are at the above URL. Don't bother loading the
* libraries - they are not used with the Marlin software.
*
* Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
* This is basically Teensyduino but with a bootloader that can handle image sizes
* larger than 64K.
*
* Installation:
*
* 1. Go to the above URL, click on the "Clone or Download" button and then
* click on "Download ZIP" button.
* 2. Unzip the file, find the "printrboard" directory and then copy it to the
* hardware directory in Arduino. The Arduino hardware directory will probably
* be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
* 3. Restart Arduino.
* 4. Select "Printrboard" from the 'Tools -> Boards' menu.
*
* Marlin_AT90USB - https://github.com/Bob-the-Kuhn/Marlin_AT90USB
* Uses the bootloader from Printerboard above.
*
* "Marlin_AT90USB" makes PWM0A available rather than the usual PWM1C. These PWMs share
* the same physical pin. Marlin uses TIMER1 to generate interrupts and sets it up such
* that PWM1A, PWM1B & PWM1C can't be used.
*
* Installation:
*
* 1. In the Arduino IDE, under Files -> Preferences paste the following URL
* https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
* 2. Under Tools -> Board -> Boards manager, scroll to the bottom, click on MARLIN_AT90USB
* and then click on "Install"
* 3. Select "AT90USB1286_TEENSYPP" from the 'Tools -> Boards' menu.
*/
/**
* To burn the bootloader that comes with Printrboard and Marlin_AT90USB:
*
* 1. Connect your programmer to the board.
* 2. In the Arduino IDE select "Printrboard" or "AT90USB1286_TEENSYPP" and then select the programmer.
* 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
* 4. The programmer is no longer needed. Remove it.
*/
#ifndef __AVR_AT90USB1286__ #ifndef __AVR_AT90USB1286__
#error "Oops! Make sure you have 'Brainwave Pro' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Teensy++ 2.0', 'AT90USB1286_TEENSYPP', or 'Printrboard' selected from the 'Tools -> Boards' menu."
#endif #endif
#include "fastio.h" #include "fastio.h"
#if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical. #if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
#error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config" #error "Uncomment '#define AT90USBxx_TEENSYPP_ASSIGNMENTS' in fastio.h for this config"
#endif #endif
#define BOARD_NAME "Brainwave Pro" #define BOARD_NAME "Brainwave Pro"

@ -54,3 +54,10 @@
#define SD_DETECT_PIN 6 #define SD_DETECT_PIN 6
#endif // NEWPANEL && ULTRA_LCD #endif // NEWPANEL && ULTRA_LCD
//
// M3/M4/M5 - Spindle/Laser Control
//
#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are not valid with this board
#undef SPINDLE_LASER_ENABLE_PIN
#undef SPINDLE_DIR_PIN

@ -24,6 +24,31 @@
* Gen3 Monolithic Electronics pin assignments * Gen3 Monolithic Electronics pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#ifndef __AVR_ATmega644P__ #ifndef __AVR_ATmega644P__
#error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -73,3 +98,4 @@
#define PS_ON_PIN 14 // Alex, does this work on the card? #define PS_ON_PIN 14 // Alex, does this work on the card?
// Alex extras from Gen3+ // Alex extras from Gen3+

@ -24,6 +24,32 @@
* Gen3+ pin assignments * Gen3+ pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the SANGUINO board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -73,4 +99,3 @@
// //
#define SDSS 4 #define SDSS 4
#define PS_ON_PIN 14 #define PS_ON_PIN 14

@ -24,6 +24,33 @@
* Gen6 pin assignments * Gen6 pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* 1) added pointer to a current Arduino IDE extension
* 2) added support for M3, M4 & M5 spindle control commands
* 3) added case light pin definition
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#ifndef __AVR_ATmega644P__ #ifndef __AVR_ATmega644P__
#ifndef __AVR_ATmega1284P__ #ifndef __AVR_ATmega1284P__
#error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
@ -80,7 +107,15 @@
// //
#define SDSS 17 #define SDSS 17
#define DEBUG_PIN 0 #define DEBUG_PIN 0
#define CASE_LIGHT_PIN 16 // MUST BE HARDWARE PWM
// RS485 pins // RS485 pins
#define TX_ENABLE_PIN 12 #define TX_ENABLE_PIN 12
#define RX_ENABLE_PIN 13 #define RX_ENABLE_PIN 13
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 5 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 6

@ -24,6 +24,32 @@
* Gen6 Deluxe pin assignments * Gen6 Deluxe pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the SANGUINO board and then select the CPU.
*
*/
#define BOARD_NAME "Gen6 Deluxe" #define BOARD_NAME "Gen6 Deluxe"
#include "pins_GEN6.h" #include "pins_GEN6.h"

@ -24,8 +24,35 @@
* Gen7 v1.1, v1.2, v1.3 pin assignments * Gen7 v1.1, v1.2, v1.3 pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* 1) added pointer to a current Arduino IDE extension
* 2) added support for M3, M4 & M5 spindle control commands
* 3) added case light pin definition
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
#ifndef BOARD_NAME #ifndef BOARD_NAME
@ -39,10 +66,13 @@
// //
// Limit Switches // Limit Switches
// //
#define X_STOP_PIN 7 #define X_MIN_PIN 7
#define Y_STOP_PIN 5 #define Y_MIN_PIN 5
#define Z_MIN_PIN 1 #define Z_MIN_PIN 1
#define Z_MAX_PIN 0 #define Z_MAX_PIN 0
#define Y_MAX_PIN 2
#define X_MAX_PIN 6
// //
// Z Probe (when not Z_MIN_PIN) // Z Probe (when not Z_MIN_PIN)
@ -91,6 +121,12 @@
// //
#define PS_ON_PIN 15 #define PS_ON_PIN 15
#if GEN7_VERSION < 13
#define CASE_LIGHT_PIN 16 // MUST BE HARDWARE PWM
#else // Gen7 v1.3 removed the I2C connector & signals so need to get PWM off the PC power supply header
#define CASE_LIGHT_PIN 15 // MUST BE HARDWARE PWM
#endif
// All these generations of Gen7 supply thermistor power // All these generations of Gen7 supply thermistor power
// via PS_ON, so ignore bad thermistor readings // via PS_ON, so ignore bad thermistor readings
#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
@ -101,3 +137,13 @@
#define TX_ENABLE_PIN 12 #define TX_ENABLE_PIN 12
#define RX_ENABLE_PIN 13 #define RX_ENABLE_PIN 13
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown!
#define SPINDLE_DIR_PIN 11
#if GEN7_VERSION < 13
#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM
#else // Gen7 v1.3 removed the I2C connector & signals so need to get PWM off the PC power supply header
#define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM
#endif

@ -24,6 +24,31 @@
* Gen7 v1.3 pin assignments * Gen7 v1.3 pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#define BOARD_NAME "Gen7 v1.3" #define BOARD_NAME "Gen7 v1.3"
#define GEN7_VERSION 13 // v1.3 #define GEN7_VERSION 13 // v1.3

@ -24,8 +24,35 @@
* Gen7 v1.4 pin assignments * Gen7 v1.4 pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* 1) added pointer to a current Arduino IDE extension
* 2) added support for M3, M4 & M5 spindle control commands
* 3) added case light pin definition
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
#define BOARD_NAME "Gen7 v1.4" #define BOARD_NAME "Gen7 v1.4"
@ -74,6 +101,7 @@
// Misc. Functions // Misc. Functions
// //
#define PS_ON_PIN 15 #define PS_ON_PIN 15
#define CASE_LIGHT_PIN 15 // MUST BE HARDWARE PWM
// A pin for debugging // A pin for debugging
#define DEBUG_PIN 0 #define DEBUG_PIN 0
@ -81,3 +109,10 @@
// RS485 pins // RS485 pins
#define TX_ENABLE_PIN 12 #define TX_ENABLE_PIN 12
#define RX_ENABLE_PIN 13 #define RX_ENABLE_PIN 13
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 21

@ -27,8 +27,35 @@
* Please review the pins and adjust them for your needs. * Please review the pins and adjust them for your needs.
*/ */
/**
* Rev B 26 DEC 2016
*
* 1) added pointer to a current Arduino IDE extension
* 2) added support for M3, M4 & M5 spindle control commands
* 3) added case light pin definition
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
#define BOARD_NAME "Gen7 Custom" #define BOARD_NAME "Gen7 Custom"
@ -76,6 +103,7 @@
// //
#define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
#define PS_ON_PIN 19 #define PS_ON_PIN 19
#define CASE_LIGHT_PIN 15 // MUST BE HARDWARE PWM
// A pin for debugging // A pin for debugging
#define DEBUG_PIN -1 #define DEBUG_PIN -1
@ -101,3 +129,10 @@
// RS485 pins // RS485 pins
//#define TX_ENABLE_PIN 12 //#define TX_ENABLE_PIN 12
//#define RX_ENABLE_PIN 13 //#define RX_ENABLE_PIN 13
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 5 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 16 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 6

@ -66,3 +66,8 @@
#undef PS_ON_PIN #undef PS_ON_PIN
#undef KILL_PIN #undef KILL_PIN
#undef SD_DETECT_PIN #undef SD_DETECT_PIN
#if Z_STEP_PIN == 26
#undef Z_STEP_PIN
#define Z_STEP_PIN 32
#endif

@ -127,6 +127,7 @@
// //
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 2
// //
// LCD / Controller // LCD / Controller
@ -152,3 +153,10 @@
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#endif // MINIPANEL #endif // MINIPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 7 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 8

@ -97,6 +97,7 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define CASE_LIGHT_PIN 2
// //
// LCD / Controller // LCD / Controller
@ -120,3 +121,10 @@
#define SD_DETECT_PIN -1 // RAMPS doesn't use this #define SD_DETECT_PIN -1 // RAMPS doesn't use this
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 3 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 11

@ -71,8 +71,8 @@
#define E1_DIR_PIN 39 #define E1_DIR_PIN 39
#define E1_ENABLE_PIN 28 #define E1_ENABLE_PIN 28
#define E2_STEP_PIN 23 #define E2_STEP_PIN 23 // ? schematic says 24
#define E2_DIR_PIN 24 #define E2_DIR_PIN 24 // ? schematic says 23
#define E2_ENABLE_PIN 22 #define E2_ENABLE_PIN 22
// //
@ -112,6 +112,7 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define CASE_LIGHT_PIN 2
// //
// LCD / Controller // LCD / Controller
@ -129,3 +130,10 @@
#define BTN_EN1 61 #define BTN_EN1 61
#define BTN_EN2 59 #define BTN_EN2 59
#define BTN_ENC 43 #define BTN_ENC 43
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 3 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 11

@ -28,6 +28,8 @@
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
#endif #endif
#define MEGATRONICS_31
#if ENABLED(MEGATRONICS_31) #if ENABLED(MEGATRONICS_31)
#define BOARD_NAME "Megatronics v3.1" #define BOARD_NAME "Megatronics v3.1"
#else #else
@ -129,6 +131,7 @@
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define CASE_LIGHT_PIN 45 // try the keypad connector
// //
// LCD / Controller // LCD / Controller
@ -140,11 +143,14 @@
#define BTN_ENC 33 #define BTN_ENC 33
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 56 // CS chip select / SS chip slave select #define LCD_PINS_RS 56 // CS chip select / SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock #define LCD_PINS_D4 52 // SCK (CLK) clock
#define SD_DETECT_PIN 35 #define SD_DETECT_PIN 35
#else #else
#define LCD_PINS_RS 32 #define LCD_PINS_RS 32
#define LCD_PINS_ENABLE 31 #define LCD_PINS_ENABLE 31
#define LCD_PINS_D4 14 #define LCD_PINS_D4 14
@ -164,3 +170,27 @@
#endif #endif
#endif #endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if DISABLED(REPRAPWORLD_KEYPAD) // try to use the keypad connector first
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 43 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 42
#elif EXTRUDERS <= 2
// Hijack the last extruder so that we can get the PWM signal off the Y breakout
// Move Y to the E2 plug. This makes dual Y steppers harder
#undef Y_ENABLE_PIN // 4
#undef Y_STEP_PIN // 5
#undef Y_DIR_PIN // 17
#undef E2_ENABLE_PIN // 23
#undef E2_STEP_PIN // 22
#undef E2_DIR_PIN // 60
#define Y_ENABLE_PIN 23
#define Y_STEP_PIN 22
#define Y_DIR_PIN 60
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 5
#endif

@ -41,6 +41,17 @@
* *
*/ */
/**
* Rev B 2 JAN 2017
*
* Added pin definitions for:
* M3, M4 & M5 spindle control commands
* case light
*
* Corrected pin assignment for MOSFET_B_PIN pin. Changed it from 9 to 11. The port
* number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
*/
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -140,7 +151,7 @@
// With no heated bed, an additional 24V fan is possible. // With no heated bed, an additional 24V fan is possible.
// //
#define MOSFET_A_PIN 6 // H3 #define MOSFET_A_PIN 6 // H3
#define MOSFET_B_PIN 11 // B5 #define MOSFET_B_PIN 11 // B5 - Rev A of this file had this pin assigned to 9
#define MOSFET_C_PIN 45 // L4 #define MOSFET_C_PIN 45 // L4
#define MOSFET_D_PIN 44 // L5 #define MOSFET_D_PIN 44 // L5
@ -193,11 +204,11 @@
#define LED_PIN 13 // B7 #define LED_PIN 13 // B7
#define CUTOFF_RESET_PIN 16 // H1 #define CUTOFF_RESET_PIN 16 // H1
#define CUTOFF_TEST_PIN 17 // H0 #define CUTOFF_TEST_PIN 17 // H0
#define CASE_LIGHT_PIN 44 // L5 MUST BE HARDWARE PWM
// //
// LCD / Controller // LCD / Controller
// //
#ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER #ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#define LCD_PINS_RS 33 // C4, LCD-STROBE #define LCD_PINS_RS 33 // C4, LCD-STROBE
@ -246,7 +257,6 @@
#endif #endif
// //
// SD Card // SD Card
// //
@ -255,7 +265,20 @@
#define MAX_PIN THERMO_SCK_PIN #define MAX_PIN THERMO_SCK_PIN
//check if all pins are defined in mega/pins_arduino.h //
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 66 // K4 Pin should have a pullup!
#define SPINDLE_LASER_PWM_PIN 8 // H5 MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 67 // K5
// Check if all pins are defined in mega/pins_arduino.h
#include <Arduino.h> #include <Arduino.h>
static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h" static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h"
"to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below"); "to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below");

@ -111,6 +111,7 @@
// //
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 9
// //
// LCD / Controller // LCD / Controller
@ -140,3 +141,12 @@
#endif // NEWPANEL #endif // NEWPANEL
#endif // ULTRA_LCD #endif // ULTRA_LCD
//
// M3/M4/M5 - Spindle/Laser Control
//
// use P1 connector for spindle pins
#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 18 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 19

@ -24,6 +24,13 @@
* Minitronics v1.0/1.1 pin assignments * Minitronics v1.0/1.1 pin assignments
*/ */
/**
* Rev B 2 JAN 2017
*
* Added pin definitions for M3, M4 & M5 spindle control commands
*
*/
#ifndef __AVR_ATmega1281__ #ifndef __AVR_ATmega1281__
#error "Oops! Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -123,3 +130,19 @@
#define SD_DETECT_PIN -1 // Minitronics doesn't use this #define SD_DETECT_PIN -1 // Minitronics doesn't use this
#endif #endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE) // assumes we're only doing CNC work (no 3D printing)
#undef HEATER_BED_PIN
#undef TEMP_BED_PIN // need to free up some pins but also need to
#undef TEMP_0_PIN // re-assign them (to unused pins) because Marlin
#undef TEMP_1_PIN // requires the presence of certain pins or else it
#define HEATER_BED_PIN 4 // won't compile
#define TEMP_BED_PIN 50
#define TEMP_0_PIN 51
#define SPINDLE_LASER_ENABLE_PIN 52 // using A6 because it already has a pull up on it
#define SPINDLE_LASER_PWM_PIN 3 // WARNING - LED & resistor pull up to +12/+24V stepper voltage
#define SPINDLE_DIR_PIN 53
#endif

@ -22,6 +22,8 @@
/** /**
* MKS BASE 1.0 Arduino Mega2560 with RAMPS v1.4 pin assignments * MKS BASE 1.0 Arduino Mega2560 with RAMPS v1.4 pin assignments
*
* Rev B - Override pin definitions for CASE_LIGHT and M3/M4/M5 spindle control
*/ */
#if HOTENDS > 2 || E_STEPPERS > 2 #if HOTENDS > 2 || E_STEPPERS > 2
@ -36,4 +38,13 @@
// Power outputs EFBF or EFBE // Power outputs EFBF or EFBE
#define MOSFET_D_PIN 7 #define MOSFET_D_PIN 7
#define CASE_LIGHT_PIN 2
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 2 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 15 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 19
#include "pins_RAMPS.h" #include "pins_RAMPS.h"

@ -51,6 +51,31 @@
* REF http://sanguino.cc/hardware * REF http://sanguino.cc/hardware
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
#error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)" #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)"
#endif #endif

@ -50,8 +50,33 @@
* *
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#ifndef __AVR_ATmega644__ #ifndef __AVR_ATmega644__
#error "Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
#define BOARD_NAME "Alpha OMCA" #define BOARD_NAME "Alpha OMCA"

@ -137,6 +137,7 @@
#define LED_PIN 13 #define LED_PIN 13
#define FILWIDTH_PIN 3 // Analog Input #define FILWIDTH_PIN 3 // Analog Input
#define PS_ON_PIN 4 #define PS_ON_PIN 4
#define CASE_LIGHT_PIN 46
// //
// LCD / Controller // LCD / Controller
@ -208,3 +209,10 @@
#endif // !NEWPANEL #endif // !NEWPANEL
#endif // ULTRA_LCD #endif // ULTRA_LCD
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 31 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 32

@ -204,6 +204,16 @@
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#if !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
#undef CASE_LIGHT_PIN
#if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
#endif
#endif
// //
// LCD / Controller // LCD / Controller
// //
@ -361,3 +371,19 @@
#endif // NEWPANEL #endif // NEWPANEL
#endif // ULTRA_LCD #endif // ULTRA_LCD
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
#if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 5
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 65
#endif
#endif

@ -101,3 +101,11 @@
#define SDPOWER 48 #define SDPOWER 48
#define SDSS 53 #define SDSS 53
#define LED_PIN 13 #define LED_PIN 13
#define CASE_LIGHT_PIN 45 // MUST BE HARDWARE PWM
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 43

@ -133,6 +133,7 @@
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 45 #define PS_ON_PIN 45
#define KILL_PIN 46 #define KILL_PIN 46
#define CASE_LIGHT_PIN 45
// //
// LCD / Controller // LCD / Controller
@ -148,3 +149,10 @@
#define BTN_EN1 11 #define BTN_EN1 11
#define BTN_EN2 12 #define BTN_EN2 12
#define BTN_ENC 43 #define BTN_ENC 43
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 14 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 15

@ -24,6 +24,33 @@
* Sanguinololu board pin assignments * Sanguinololu board pin assignments
*/ */
/**
* Rev B 26 DEC 2016
*
* 1) added pointer to a current Arduino IDE extension
* 2) added support for M3, M4 & M5 spindle control commands
* 3) added case light pin definition
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -96,19 +123,26 @@
// //
// Misc. Functions // Misc. Functions
// //
/** /**
* On some broken versions of the Sanguino libraries the pin definitions are wrong, * In some versions of the Sanguino libraries the pin
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368. * definitions are wrong, with SDSS = 24 and LED_PIN = 28 (Melzi).
* If you encounter issues with these pins, upgrade your
* Sanguino libraries! See #368.
*/ */
//#define SDSS 24 //#define SDSS 24
#define SDSS 31 #define SDSS 31
#if IS_MELZI #if IS_MELZI
#define LED_PIN 27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368. #define LED_PIN 27
#elif MB(STB_11) #elif MB(STB_11)
#define LCD_BACKLIGHT_PIN 17 // LCD backlight LED #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
#endif #endif
#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header
#define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available
#endif
// //
// LCD / Controller // LCD / Controller
// //
@ -181,14 +215,62 @@
#else #else
#define BTN_ENC 30 #define BTN_ENC 30
#endif #endif
#elif ENABLED(OLED_PANEL_TINYBOY2) #else // !Panelolu2
#define BTN_ENC 28
#define LCD_SDSS -1
#else // !Panelolu2, !TinyBoy2
#define BTN_ENC 16 #define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi #define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif // !Panelolu2, !TinyBoy2 #endif // !Panelolu2
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE)
#if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header
#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 11
#elif !MB(MELZI) // use X stepper motor socket
/**
* To control the spindle speed and have an LCD you must sacrifice
* the Extruder and pull some signals off the X stepper driver socket.
*
* The following assumes:
* - The X stepper driver socket is empty
* - The extruder driver socket has a driver board plugged into it
* - The X stepper wires are attached the the extruder connector
*/
/**
* Where to get the spindle signals
*
* spindle signal socket name socket name
* -------
* /ENABLE O| |O VMOT
* MS1 O| |O GND
* MS2 O| |O 2B
* MS3 O| |O 2A
* /RESET O| |O 1A
* /SLEEP O| |O 1B
* SPINDLE_LASER_PWM_PIN STEP O| |O VDD
* SPINDLE_LASER_ENABLE_PIN DIR O| |O GND
* -------
*
* Note: Socket names vary from vendor to vendor.
*/
#undef X_DIR_PIN
#undef X_ENABLE_PIN
#undef X_STEP_PIN
#define X_DIR_PIN 0
#define X_ENABLE_PIN 14
#define X_STEP_PIN 1
#define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 21 // Pin should have a pullup!
#define SPINDLE_DIR_PIN -1 // No pin available on the socket for the direction pin
#endif
#endif // SPINDLE_LASER_ENABLE

@ -115,7 +115,6 @@
#define EXT_AUX_A4 4 // Analog #define EXT_AUX_A4 4 // Analog
#define EXT_AUX_A4_IO 44 // Digital IO, 42 (teensy), 44 (marlin) #define EXT_AUX_A4_IO 44 // Digital IO, 42 (teensy), 44 (marlin)
// //
// LCD / Controller // LCD / Controller
// //
@ -134,10 +133,23 @@
#endif // SAV_3DLCD #endif // SAV_3DLCD
#if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD) #if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD)
#define BTN_EN1 EXT_AUX_A1_IO #define BTN_EN1 EXT_AUX_A1_IO
#define BTN_EN2 EXT_AUX_A0_IO #define BTN_EN2 EXT_AUX_A0_IO
#define BTN_ENC EXT_AUX_PWM_D24 #define BTN_ENC EXT_AUX_PWM_D24
#define KILL_PIN EXT_AUX_A2_IO #define KILL_PIN EXT_AUX_A2_IO
#define HOME_PIN EXT_AUX_A4_IO #define HOME_PIN EXT_AUX_A4_IO
#endif // SAV_3DLCD || SAV_3DGLCD
#else // Try to use the expansion header for spindle control
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 24 // 12 AT90USB… pin #
#define SPINDLE_LASER_ENABLE_PIN 39 // Pin should have a pullup! 41 AT90USB… pin #
#define SPINDLE_DIR_PIN 40 // 42 AT90USB… pin #
#define CASE_LIGHT_PIN 0 // 24 AT90USB… pin #
#endif

@ -24,6 +24,31 @@
* Sethi 3D_1 pin assignments - www.sethi3d.com.br * Sethi 3D_1 pin assignments - www.sethi3d.com.br
*/ */
/**
* Rev B 26 DEC 2016
*
* added pointer to a current Arduino IDE extension
* this assumes that this board uses the Sanguino pin map
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu."
#endif #endif

@ -124,6 +124,7 @@
#define SDSS 20 // 8 #define SDSS 20 // 8
#define LED_PIN 6 #define LED_PIN 6
#define PS_ON_PIN 27 #define PS_ON_PIN 27
#define CASE_LIGHT_PIN 1 // MUST BE HARDWARE PWM
// //
// LCD / Controller // LCD / Controller
@ -139,3 +140,10 @@
#define BTN_EN2 39 #define BTN_EN2 39
#define BTN_ENC 40 #define BTN_ENC 40
#endif #endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_ENABLE_PIN 5 // Pin should have a pullup!
#define SPINDLE_LASER_PWM_PIN 0 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 7

@ -21,18 +21,73 @@
*/ */
/** /**
* Teensylu 0.7 pin assignments (AT90USB1286) * rev B 30 DEC 2016
* Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! *
* http://www.pjrc.com/teensy/teensyduino.html * The original version of this file did NOT result in a useful program because:
* See http://reprap.org/wiki/Printrboard for more info * 1. The pin numbers assumed that the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line
* in FASTIO.h was commented out. There wasn't an Arduino IDE 1.6.x extension/package
* that supported this pin map so the latest Marlin wouldn't compile.
* 2. The silkscreen for the four end stops don't agree with the schematic. Activating
* the X endstop would tell the software that the Y endstop just went active.
* 3. The thermistor inputs also had heater names assigned to them. The result was
* thermistor inputs that were set to digital outputs.
*
* Rev B corrects the above problems by:
* 1. The "Marlin_AT90USB" extension/package was developed. This extension enables the
* latest Marlin software to compile using Arduino IDE 1.6.x and 1.80.
* 2. The endstop pin numbers in this file were changed to match the silkscreen. This
* makes it a little confusing when trying to correlate the schematic with the pin
* numbers used in this file.
* 3. The offending heater names were deleted.
*
* To create a useable image for Teensylu do the following:
* a) Install the Marlin_AT90USB extension with either of the following methods:
* Automatic - paste this URL into preferences and then use Boards manager
* https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
* Manual:
* 1. Copy the following URL into Go to "https://github.com/Bob-the-Kuhn/Marlin_AT90USB",
* click on the "Clone or Download" button and then click on "Download ZIP" button.
* 2. Unzip the file, find the "Marlin_AT90USB" directory and then copy it to the
* hardware directory in Arduino. The Arduino hardware directory will probably be
* located in a path similar to this: C:\Program Files (x86)\Arduino\hardware
* b) Connect the USBtinyISP to the board.
* c) In the Arduino IDE select the "AT90USB1286_STANDARD" board in the of the "Marlin_AT90USB"
* section and select the "USBtinyISP" programmer.
* d) In the Arduino IDE click on "burn bootloader". Don't worry about the "verify
* failed at 1F000" error message.
* e) The USBtinyISP programmer is no longer needed. Remove it.
* f) In FASTIO.h comment out the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line.
* g) To upload a sketch do the following:
* 1. remove the jumper
* 2. press reset
* 3. click on the "upload" button in the Arduino IDE
* 4. wait until the upload finishes (less than a minute)
* 5. put the jumper back on
* 6. press the reset button
*
*
* NOTE - the "Marlin_AT90USB" pin maps make PWM0A available rather than the usual PWM1C.
* These PWMs share the same physical pin. Marlin uses TIMER1 to generate
* interrupts and sets it up such that PWM1A, PWM1B & PWM1C can't be used.
*/
/**
* SILKSCREEN ERROR
*
* The silkscreen for the endstops do NOT match the schematic. The silkscreen SHOULD
* read (from left to right) X-STOP, Y-STOP, Z-STOP & E-STOP. The silkscreen actually
* reads E-STOP, X-STOP, Y-STOP & Z-STOP.
*
* The pin assignments in this file match the silkscreen.
*/ */
#ifndef __AVR_AT90USB1286__
#error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." #if !defined(__AVR_AT90USB1286__) && !defined(__AVR_AT90USB1286P__)
#error "Oops! Make sure you have 'AT90USB1286_STANDARD' selected from the 'Tools -> Boards' menu."
#endif #endif
#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. #if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
#error "These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" #error "please disable (comment out) the AT90USBxx_TEENSYPP_ASSIGNMENTS flag in FASTIO.h "
#endif #endif
#define BOARD_NAME "Teensylu" #define BOARD_NAME "Teensylu"
@ -40,12 +95,23 @@
#define USBCON 1286 // Disable MarlinSerial etc. #define USBCON 1286 // Disable MarlinSerial etc.
#define LARGE_FLASH true #define LARGE_FLASH true
// //
// Limit Switches // Limit Switche definitions that match the SCHEMATIC
// //
#define X_STOP_PIN 13 //#define X_STOP_PIN 13
#define Y_STOP_PIN 14 //#define Y_STOP_PIN 14
#define Z_STOP_PIN 15 //#define Z_STOP_PIN 15
//#define E_STOP_PIN 36
//
// Limit Switch definitions that match the SILKSCREEN
//
#define X_STOP_PIN 14
#define Y_STOP_PIN 15
#define Z_STOP_PIN 36
//#define E_STOP_PIN 13
// //
// Steppers // Steppers
@ -66,9 +132,9 @@
#define E0_DIR_PIN 7 #define E0_DIR_PIN 7
#define E0_ENABLE_PIN 19 #define E0_ENABLE_PIN 19
//
// Temperature Sensors // Temperature Sensors
//
#define TEMP_0_PIN 7 // Analog Input (Extruder) #define TEMP_0_PIN 7 // Analog Input (Extruder)
#define TEMP_BED_PIN 6 // Analog Input (Bed) #define TEMP_BED_PIN 6 // Analog Input (Bed)
@ -76,22 +142,15 @@
// Heaters / Fans // Heaters / Fans
// //
#define HEATER_0_PIN 21 // Extruder #define HEATER_0_PIN 21 // Extruder
#define HEATER_1_PIN 46
#define HEATER_2_PIN 47
#define HEATER_BED_PIN 20 #define HEATER_BED_PIN 20
// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin
// fastio pin numbering otherwise
#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN)
#define FAN_PIN 22 #define FAN_PIN 22
#else
#define FAN_PIN 16
#endif
// //
// Misc. Functions // Misc. Functions
// //
#define SDSS 8 #define SDSS 8
#define CASE_LIGHT_PIN 24
// //
// LCD / Controller // LCD / Controller
@ -101,13 +160,19 @@
#define BEEPER_PIN -1 #define BEEPER_PIN -1
#if ENABLED(LCD_I2C_PANELOLU2) #if ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 27 // RX1 - fastio.h pin mapping 27 #define BTN_EN1 27
#define BTN_EN2 26 // TX1 - fastio.h pin mapping 26 #define BTN_EN2 26
#define BTN_ENC 43 // A3 - fastio.h pin mapping 43 #define BTN_ENC 43
#define SDSS 40 // use SD card on Panelolu2 (Teensyduino pin mapping) #define SDSS 40 // use SD card on Panelolu2
#endif // LCD_I2C_PANELOLU2 #endif // LCD_I2C_PANELOLU2
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 12 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 42

@ -24,6 +24,14 @@
* Ultiboard v2.0 pin assignments * Ultiboard v2.0 pin assignments
*/ */
/**
* Rev B 2 JAN 2017
*
* Added pin definitions for:
* M3, M4 & M5 spindle control commands
* case light
*/
#ifndef __AVR_ATmega2560__ #ifndef __AVR_ATmega2560__
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -110,3 +118,16 @@
#define BTN_EN1 40 #define BTN_EN1 40
#define BTN_EN2 41 #define BTN_EN2 41
#define BTN_ENC 19 #define BTN_ENC 19
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE) // use the LED_PIN for spindle speed control or case light
#undef LED_PIN
#define SPINDLE_DIR_PIN 16
#define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup!
#define SPINDLE_LASER_PWM_PIN 8 // MUST BE HARDWARE PWM
#else
#undef LED_PIN
#define CASE_LIGHT_PIN 8
#endif

@ -24,6 +24,14 @@
* Ultimaker pin assignments * Ultimaker pin assignments
*/ */
/**
* Rev B 2 JAN 2017
*
* Added pin definitions for:
* M3, M4 & M5 spindle control commands
* case light
*/
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -102,6 +110,7 @@
#define LED_PIN 13 #define LED_PIN 13
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing. #define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing.
#define CASE_LIGHT_PIN 8
// //
// LCD / Controller // LCD / Controller
@ -146,3 +155,10 @@
#endif // !NEWPANEL #endif // !NEWPANEL
#endif // ULTRA_LCD #endif // ULTRA_LCD
//
// M3/M4/M5 - Spindle/Laser Control
//
#define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 11 // use the EXP3 PWM header

@ -24,6 +24,42 @@
* Ultimaker pin assignments (Old electronics) * Ultimaker pin assignments (Old electronics)
*/ */
/**
* Rev B 3 JAN 2017
*
* Details on pin definitions for M3, M4 & M5 spindle control commands and for
* the CASE_LIGHT_PIN are at the end of this file.
*
* This started out as an attempt to add pin definitions for M3, M4 & M5 spindle
* control commands but quickly turned into a head scratcher as the sources for
* the revisions provided inconsistent information.
*
* As best I can determine:
* 1.5.3 boards should use the pins_ULTIMAKER.h file which means the BOARD_NAME
* define in this file should say 1.5.3 rather than 1.5.4
* This file is meant for 1.1 - 1.3 boards.
* The endstops for the 1.0 boards use different definitions than on the 1.1 - 1.3
* boards.
*
* I've added sections that have the 1.0 and 1.5.3 + endstop definitions so you can
* easily switch if needed. I've also copied over the 1.5.3 + LCD definitions.
*
* To be 100% sure of the board you have:
* 1. In Configuration_adv.h enable "PINS_DEBUGGING"
* 2. Compile & uploade
* 3. Enter the command "M43 W1 I1". This command will report that pin nmumber and
* name of any pin that changes state.
* 4. Using a 1k (approximately) resistor pull the endstops and some of the LCD pins
* to ground and see what is reported.
* 5. If the reported pin doesn't match the file then try a different board revision
* and repeat steps 2 - 5
*/
#define board_rev_1_1_TO_1_3
//#define board_rev_1_0
//#define board_rev_1_5
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
#endif #endif
@ -37,18 +73,38 @@
// //
// Limit Switches // Limit Switches
// //
#define X_MIN_PIN 15 #if ENABLED(board_rev_1_1_TO_1_3)
#define X_MAX_PIN 14 #define X_MIN_PIN 15 // SW1
#define Y_MIN_PIN 17 #define X_MAX_PIN 14 // SW2
#define Y_MAX_PIN 16 #define Y_MIN_PIN 17 // SW3
#define Z_MIN_PIN 19 #define Y_MAX_PIN 16 // SW4
#define Z_MAX_PIN 18 #define Z_MIN_PIN 19 // SW5
#define Z_MAX_PIN 18 // SW6
#endif
#if ENABLED(board_rev_1_0)
#define X_MIN_PIN 13 // SW1
#define X_MAX_PIN 12 // SW2
#define Y_MIN_PIN 11 // SW3
#define Y_MAX_PIN 10 // SW4
#define Z_MIN_PIN 9 // SW5
#define Z_MAX_PIN 8 // SW6
#endif
#if ENABLED(board_rev_1_5)
#define X_MIN_PIN 22
#define X_MAX_PIN 24
#define Y_MIN_PIN 26
#define Y_MAX_PIN 28
#define Z_MIN_PIN 30
#define Z_MAX_PIN 32
#endif
// //
// Z Probe (when not Z_MIN_PIN) // Z Probe (when not Z_MIN_PIN)
// //
#ifndef Z_MIN_PROBE_PIN #ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 18 #define Z_MIN_PROBE_PIN Z_MAX_PIN
#endif #endif
// //
@ -70,9 +126,9 @@
#define E0_DIR_PIN 45 #define E0_DIR_PIN 45
#define E0_ENABLE_PIN 41 #define E0_ENABLE_PIN 41
#define E1_STEP_PIN -1 #define E1_STEP_PIN -1 // 49
#define E1_DIR_PIN -1 #define E1_DIR_PIN -1 // 47
#define E1_ENABLE_PIN -1 #define E1_ENABLE_PIN -1 // 48
// //
// Temperature Sensors // Temperature Sensors
@ -84,14 +140,144 @@
// Heaters / Fans // Heaters / Fans
// //
#define HEATER_0_PIN 2 #define HEATER_0_PIN 2
#define HEATER_1_PIN 1 //#define HEATER_1_PIN 3 // used for case light Rev A said "1"
#define HEATER_BED_PIN 4
// //
// LCD / Controller // LCD / Controller
// //
#if ENABLED(board_rev_1_0) || ENABLED(board_rev_1_1_TO_1_3)
#define LCD_PINS_RS 24 #define LCD_PINS_RS 24
#define LCD_PINS_ENABLE 22 #define LCD_PINS_ENABLE 22
#define LCD_PINS_D4 36 #define LCD_PINS_D4 36
#define LCD_PINS_D5 34 #define LCD_PINS_D5 34
#define LCD_PINS_D6 32 #define LCD_PINS_D6 32
#define LCD_PINS_D7 30 #define LCD_PINS_D7 30
#elif ENABLED(board_rev_1_5) && ENABLED(ULTRA_LCD)
#define BEEPER_PIN 18
#if ENABLED(NEWPANEL)
#define LCD_PINS_RS 20
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 16
#define LCD_PINS_D5 21
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
// buttons are directly attached
#define BTN_EN1 40
#define BTN_EN2 42
#define BTN_ENC 19
#define SD_DETECT_PIN 38
#else // !NEWPANEL - Old style panel with shift register
// buttons are attached to a shift register
#define SHIFT_CLK 38
#define SHIFT_LD 42
#define SHIFT_OUT 40
#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 5
#define LCD_PINS_D4 6
#define LCD_PINS_D5 21
#define LCD_PINS_D6 20
#define LCD_PINS_D7 19
#define SD_DETECT_PIN -1
#endif // !NEWPANEL
#endif // ULTRA_LCD
//
// case light - see spindle section for more info on available hardware PWMs
//
#if !PIN_EXISTS(CASE_LIGHT) && ENABLED(board_rev_1_5)
#define CASE_LIGHT_PIN 7 // use PWM - MUST BE HARDWARE PWM
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE)
#if ENABLED(board_rev_1_0) // use the last three SW positions
#undef Z_MIN_PROBE_PIN
#undef X_MIN_PIN // SW1
#undef X_MAX_PIN // SW2
#undef Y_MIN_PIN // SW3
#undef Y_MAX_PIN // SW4
#undef Z_MIN_PIN // SW5
#undef Z_MAX_PIN // SW6
#define X_STOP_PIN 13 // SW1 (didn't change) - also has a useable hardware PWM
#define Y_STOP_PIN 12 // SW2
#define Z_STOP_PIN 11 // SW3
#define SPINDLE_DIR_PIN 10 // SW4
#define SPINDLE_LASER_PWM_PIN 9 // SW5 MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 8 // SW6 Pin should have a pullup!
#elif ENABLED(board_rev_1_5) // use the same pins - but now they are on a different connector
#define SPINDLE_DIR_PIN 10 // EXP3-6 (silkscreen says 10)
#define SPINDLE_LASER_PWM_PIN 9 // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 8 // EXP3-8 (silkscreen says 8) Pin should have a pullup!
#elif ENABLED(board_rev_1_1_TO_1_3)
/**
* Only four hardware PWMs physically connected to anything on these boards:
*
* HEATER_0_PIN 2 silkscreen varies - usually "PWM 1" or "HEATER1"
* HEATER_1_PIN 3 silkscreen varies - usually "PWM 2" or "HEATER2"
* HEATER_BED_PIN 4 silkscreen varies - usually "PWM 3" or "HEATED BED"
* E0_DIR_PIN 45
*
* If one of the heaters is used then special precautions will usually be needed.
* They have an LED and resistor pullup to +24V which could damage 3.3V-5V ICs.
*/
#if EXTRUDERS == 1 // Move E0 stepper module to the spare and get signals from E0
#undef E0_STEP_PIN
#undef E0_DIR_PIN
#undef E0_ENABLE_PIN
#define E0_STEP_PIN 49
#define E0_DIR_PIN 47
#define E0_ENABLE_PIN 48
#define SPINDLE_DIR_PIN 43
#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup!
#elif TEMP_SENSOR_BED == 0 // Can't use E0 so see if HEATER_BED_PIN is available
#undef HEATER_BED_PIN
#define SPINDLE_DIR_PIN 38 // Probably pin 4 on 10 pin connector closest to the E0 socket
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM - Special precautions usually needed.
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup! (Probably pin 6 on the 10-pin
// connector closest to the E0 socket)
#endif
#endif
#endif
/**
* Where to get the spindle signals on the E0 socket
*
* spindle signal socket name socket name
* -------
* SPINDLE_LASER_ENABLE_PIN /ENABLE *| |O VMOT
* MS1 O| |O GND
* MS2 O| |O 2B
* MS3 O| |O 2A
* /RESET O| |O 1A
* /SLEEP O| |O 1B
* SPINDLE_DIR_PIN STEP O| |O VDD
* SPINDLE_LASER_PWM_PIN DIR O| |O GND
* -------
* * - pin closest to MS1, MS2 & MS3 jumpers on the board
*
* Note: Socket names vary from vendor to vendor.
*/

@ -63,6 +63,8 @@
#include "temperature.h" #include "temperature.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "language.h" #include "language.h"
#include "ubl.h"
#include "gcode.h"
#include "Marlin.h" #include "Marlin.h"
@ -491,13 +493,13 @@ void Planner::check_axes_activity() {
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
#if HAS_FAN0 #if HAS_FAN0
thermalManager.fanSpeedSoftPwm[0] = CALC_FAN_SPEED(0); thermalManager.soft_pwm_amount_fan[0] = CALC_FAN_SPEED(0);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
thermalManager.fanSpeedSoftPwm[1] = CALC_FAN_SPEED(1); thermalManager.soft_pwm_amount_fan[1] = CALC_FAN_SPEED(1);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
thermalManager.fanSpeedSoftPwm[2] = CALC_FAN_SPEED(2); thermalManager.soft_pwm_amount_fan[2] = CALC_FAN_SPEED(2);
#endif #endif
#else #else
#if HAS_FAN0 #if HAS_FAN0
@ -533,6 +535,17 @@ void Planner::check_axes_activity() {
*/ */
void Planner::apply_leveling(float &lx, float &ly, float &lz) { void Planner::apply_leveling(float &lx, float &ly, float &lz) {
#if ENABLED(AUTO_BED_LEVELING_UBL) && UBL_DELTA // probably should also be enabled for UBL without UBL_DELTA
if (!ubl.state.active) return;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
// if z_fade_height enabled (nonzero) and raw_z above it, no leveling required
if ((planner.z_fade_height) && (planner.z_fade_height <= RAW_Z_POSITION(lz))) return;
lz += ubl.state.z_offset + ubl.get_z_correction(lx, ly) * ubl.fade_scaling_factor_for_z(lz);
#else // no fade
lz += ubl.state.z_offset + ubl.get_z_correction(lx,ly);
#endif // FADE
#endif // UBL
#if HAS_ABL #if HAS_ABL
if (!abl_enabled) return; if (!abl_enabled) return;
#endif #endif
@ -586,6 +599,39 @@ void Planner::check_axes_activity() {
void Planner::unapply_leveling(float logical[XYZ]) { void Planner::unapply_leveling(float logical[XYZ]) {
#if ENABLED(AUTO_BED_LEVELING_UBL) && UBL_DELTA
if (ubl.state.active) {
const float z_leveled = RAW_Z_POSITION(logical[Z_AXIS]),
z_ublmesh = ubl.get_z_correction(logical[X_AXIS], logical[Y_AXIS]);
float z_unlevel = z_leveled - ubl.state.z_offset - z_ublmesh;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
// for L=leveled, U=unleveled, M=mesh, O=offset, H=fade_height,
// Given L==U+O+M(1-U/H) (faded mesh correction formula for U<H)
// then U==L-O-M(1-U/H)
// so U==L-O-M+MU/H
// so U-MU/H==L-O-M
// so U(1-M/H)==L-O-M
// so U==(L-O-M)/(1-M/H) for U<H
if (planner.z_fade_height) {
const float z_unfaded = z_unlevel / (1.0 - z_ublmesh * planner.inverse_z_fade_height);
if (z_unfaded < planner.z_fade_height) // don't know until after compute
z_unlevel = z_unfaded;
}
#endif // ENABLE_LEVELING_FADE_HEIGHT
logical[Z_AXIS] = z_unlevel;
}
return; // don't fall thru to HAS_ABL or other ENABLE_LEVELING_FADE_HEIGHT logic
#endif
#if HAS_ABL #if HAS_ABL
if (!abl_enabled) return; if (!abl_enabled) return;
#endif #endif
@ -1504,10 +1550,10 @@ void Planner::refresh_positioning() {
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
void Planner::autotemp_M104_M109() { void Planner::autotemp_M104_M109() {
autotemp_enabled = code_seen('F'); autotemp_enabled = parser.seen('F');
if (autotemp_enabled) autotemp_factor = code_value_temp_diff(); if (autotemp_enabled) autotemp_factor = parser.value_celsius_diff();
if (code_seen('S')) autotemp_min = code_value_temp_abs(); if (parser.seen('S')) autotemp_min = parser.value_celsius();
if (code_seen('B')) autotemp_max = code_value_temp_abs(); if (parser.seen('B')) autotemp_max = parser.value_celsius();
} }
#endif #endif

@ -161,8 +161,10 @@ class Planner {
#if HAS_ABL #if HAS_ABL
static bool abl_enabled; // Flag that bed leveling is enabled static bool abl_enabled; // Flag that bed leveling is enabled
#if ABL_PLANAR
static matrix_3x3 bed_level_matrix; // Transform to compensate for bed level static matrix_3x3 bed_level_matrix; // Transform to compensate for bed level
#endif #endif
#endif
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
static float z_fade_height, inverse_z_fade_height; static float z_fade_height, inverse_z_fade_height;

@ -33,4 +33,4 @@ void serial_echopair_P(const char* s_P, float v) { serialprintPGM(s_P);
void serial_echopair_P(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); } void serial_echopair_P(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
void serial_spaces(uint8_t count) { while (count--) MYSERIAL.write(' '); } void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) MYSERIAL.write(' '); }

@ -23,6 +23,8 @@
#ifndef __SERIAL_H__ #ifndef __SERIAL_H__
#define __SERIAL_H__ #define __SERIAL_H__
#include "MarlinConfig.h"
#ifdef USBCON #ifdef USBCON
#include "HardwareSerial.h" #include "HardwareSerial.h"
#if ENABLED(BLUETOOTH) #if ENABLED(BLUETOOTH)

@ -27,37 +27,26 @@
#include "softspi.h" #include "softspi.h"
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin> template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
class Spi { class SPI {
static SoftSPI<MisoPin, MosiPin, SckPin> softSpi; static SoftSPI<MisoPin, MosiPin, SckPin> softSPI;
public: public:
inline __attribute__((always_inline)) FORCE_INLINE static void init() { softSPI.begin(); }
static void init() { FORCE_INLINE static void send(uint8_t data) { softSPI.send(data); }
softSpi.begin(); FORCE_INLINE static uint8_t receive() { return softSPI.receive(); }
}
inline __attribute__((always_inline))
static void send(uint8_t data) {
softSpi.send(data);
}
inline __attribute__((always_inline))
static uint8_t receive() {
return softSpi.receive();
}
}; };
//hardware spi // Hardware SPI
template<> template<>
class Spi<MISO_PIN, MOSI_PIN, SCK_PIN> { class SPI<MISO_PIN, MOSI_PIN, SCK_PIN> {
public: public:
inline __attribute__((always_inline)) FORCE_INLINE static void init() {
static void init() {
OUT_WRITE(SCK_PIN, LOW); OUT_WRITE(SCK_PIN, LOW);
OUT_WRITE(MOSI_PIN, HIGH); OUT_WRITE(MOSI_PIN, HIGH);
SET_INPUT(MISO_PIN); SET_INPUT(MISO_PIN);
WRITE(MISO_PIN, HIGH); WRITE(MISO_PIN, HIGH);
} }
inline __attribute__((always_inline)) FORCE_INLINE static uint8_t receive() {
static uint8_t receive() {
SPDR = 0; SPDR = 0;
for (;!TEST(SPSR, SPIF);); for (;!TEST(SPSR, SPIF););
return SPDR; return SPDR;
@ -65,4 +54,4 @@ class Spi<MISO_PIN, MOSI_PIN, SCK_PIN> {
}; };
#endif #endif // __SPI_H__

@ -67,17 +67,14 @@ float Temperature::current_temperature[HOTENDS] = { 0.0 },
Temperature::current_temperature_bed = 0.0; Temperature::current_temperature_bed = 0.0;
int16_t Temperature::current_temperature_raw[HOTENDS] = { 0 }, int16_t Temperature::current_temperature_raw[HOTENDS] = { 0 },
Temperature::target_temperature[HOTENDS] = { 0 }, Temperature::target_temperature[HOTENDS] = { 0 },
Temperature::current_temperature_bed_raw = 0, Temperature::current_temperature_bed_raw = 0;
Temperature::target_temperature_bed = 0;
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if HAS_HEATER_BED
float Temperature::redundant_temperature = 0.0; int16_t Temperature::target_temperature_bed = 0;
#endif #endif
uint8_t Temperature::soft_pwm_bed; #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
float Temperature::redundant_temperature = 0.0;
#if ENABLED(FAN_SOFT_PWM)
uint8_t Temperature::fanSpeedSoftPwm[FAN_COUNT];
#endif #endif
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
@ -109,24 +106,24 @@ uint8_t Temperature::soft_pwm_bed;
#endif #endif
#if WATCH_HOTENDS #if WATCH_HOTENDS
int Temperature::watch_target_temp[HOTENDS] = { 0 }; uint16_t Temperature::watch_target_temp[HOTENDS] = { 0 };
millis_t Temperature::watch_heater_next_ms[HOTENDS] = { 0 }; millis_t Temperature::watch_heater_next_ms[HOTENDS] = { 0 };
#endif #endif
#if WATCH_THE_BED #if WATCH_THE_BED
int Temperature::watch_target_bed_temp = 0; uint16_t Temperature::watch_target_bed_temp = 0;
millis_t Temperature::watch_bed_next_ms = 0; millis_t Temperature::watch_bed_next_ms = 0;
#endif #endif
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
bool Temperature::allow_cold_extrude = false; bool Temperature::allow_cold_extrude = false;
float Temperature::extrude_min_temp = EXTRUDE_MINTEMP; uint16_t Temperature::extrude_min_temp = EXTRUDE_MINTEMP;
#endif #endif
// private: // private:
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
int Temperature::redundant_temperature_raw = 0; uint16_t Temperature::redundant_temperature_raw = 0;
float Temperature::redundant_temperature = 0.0; float Temperature::redundant_temperature = 0.0;
#endif #endif
@ -194,10 +191,12 @@ int16_t Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TE
millis_t Temperature::next_auto_fan_check_ms = 0; millis_t Temperature::next_auto_fan_check_ms = 0;
#endif #endif
uint8_t Temperature::soft_pwm[HOTENDS]; uint8_t Temperature::soft_pwm_amount[HOTENDS],
Temperature::soft_pwm_amount_bed;
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
uint8_t Temperature::soft_pwm_fan[FAN_COUNT]; uint8_t Temperature::soft_pwm_amount_fan[FAN_COUNT],
Temperature::soft_pwm_count_fan[FAN_COUNT];
#endif #endif
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
@ -206,9 +205,14 @@ uint8_t Temperature::soft_pwm[HOTENDS];
#if ENABLED(PROBING_HEATERS_OFF) #if ENABLED(PROBING_HEATERS_OFF)
bool Temperature::paused; bool Temperature::paused;
int16_t Temperature::paused_hotend_temps[HOTENDS]; #endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
millis_t Temperature::heater_idle_timeout_ms[HOTENDS] = { 0 };
bool Temperature::heater_idle_timeout_exceeded[HOTENDS] = { false };
#if HAS_TEMP_BED #if HAS_TEMP_BED
int16_t Temperature::paused_bed_temp; millis_t Temperature::bed_idle_timeout_ms = 0;
bool Temperature::bed_idle_timeout_exceeded = false;
#endif #endif
#endif #endif
@ -254,13 +258,13 @@ uint8_t Temperature::soft_pwm[HOTENDS];
#if HAS_PID_FOR_BOTH #if HAS_PID_FOR_BOTH
if (hotend < 0) if (hotend < 0)
soft_pwm_bed = bias = d = (MAX_BED_POWER) >> 1; soft_pwm_amount_bed = bias = d = (MAX_BED_POWER) >> 1;
else else
soft_pwm[hotend] = bias = d = (PID_MAX) >> 1; soft_pwm_amount[hotend] = bias = d = (PID_MAX) >> 1;
#elif ENABLED(PIDTEMP) #elif ENABLED(PIDTEMP)
soft_pwm[hotend] = bias = d = (PID_MAX) >> 1; soft_pwm_amount[hotend] = bias = d = (PID_MAX) >> 1;
#else #else
soft_pwm_bed = bias = d = (MAX_BED_POWER) >> 1; soft_pwm_amount_bed = bias = d = (MAX_BED_POWER) >> 1;
#endif #endif
wait_for_heatup = true; wait_for_heatup = true;
@ -298,13 +302,13 @@ uint8_t Temperature::soft_pwm[HOTENDS];
heating = false; heating = false;
#if HAS_PID_FOR_BOTH #if HAS_PID_FOR_BOTH
if (hotend < 0) if (hotend < 0)
soft_pwm_bed = (bias - d) >> 1; soft_pwm_amount_bed = (bias - d) >> 1;
else else
soft_pwm[hotend] = (bias - d) >> 1; soft_pwm_amount[hotend] = (bias - d) >> 1;
#elif ENABLED(PIDTEMP) #elif ENABLED(PIDTEMP)
soft_pwm[hotend] = (bias - d) >> 1; soft_pwm_amount[hotend] = (bias - d) >> 1;
#elif ENABLED(PIDTEMPBED) #elif ENABLED(PIDTEMPBED)
soft_pwm_bed = (bias - d) >> 1; soft_pwm_amount_bed = (bias - d) >> 1;
#endif #endif
t1 = ms; t1 = ms;
t_high = t1 - t2; t_high = t1 - t2;
@ -367,13 +371,13 @@ uint8_t Temperature::soft_pwm[HOTENDS];
} }
#if HAS_PID_FOR_BOTH #if HAS_PID_FOR_BOTH
if (hotend < 0) if (hotend < 0)
soft_pwm_bed = (bias + d) >> 1; soft_pwm_amount_bed = (bias + d) >> 1;
else else
soft_pwm[hotend] = (bias + d) >> 1; soft_pwm_amount[hotend] = (bias + d) >> 1;
#elif ENABLED(PIDTEMP) #elif ENABLED(PIDTEMP)
soft_pwm[hotend] = (bias + d) >> 1; soft_pwm_amount[hotend] = (bias + d) >> 1;
#else #else
soft_pwm_bed = (bias + d) >> 1; soft_pwm_amount_bed = (bias + d) >> 1;
#endif #endif
cycles++; cycles++;
min = temp; min = temp;
@ -466,7 +470,7 @@ void Temperature::updatePID() {
} }
int Temperature::getHeaterPower(int heater) { int Temperature::getHeaterPower(int heater) {
return heater < 0 ? soft_pwm_bed : soft_pwm[heater]; return heater < 0 ? soft_pwm_amount_bed : soft_pwm_amount[heater];
} }
#if HAS_AUTO_FAN #if HAS_AUTO_FAN
@ -558,11 +562,22 @@ float Temperature::get_pid_output(int e) {
pid_error[HOTEND_INDEX] = target_temperature[HOTEND_INDEX] - current_temperature[HOTEND_INDEX]; pid_error[HOTEND_INDEX] = target_temperature[HOTEND_INDEX] - current_temperature[HOTEND_INDEX];
dTerm[HOTEND_INDEX] = K2 * PID_PARAM(Kd, HOTEND_INDEX) * (current_temperature[HOTEND_INDEX] - temp_dState[HOTEND_INDEX]) + K1 * dTerm[HOTEND_INDEX]; dTerm[HOTEND_INDEX] = K2 * PID_PARAM(Kd, HOTEND_INDEX) * (current_temperature[HOTEND_INDEX] - temp_dState[HOTEND_INDEX]) + K1 * dTerm[HOTEND_INDEX];
temp_dState[HOTEND_INDEX] = current_temperature[HOTEND_INDEX]; temp_dState[HOTEND_INDEX] = current_temperature[HOTEND_INDEX];
#if ENABLED(ADVANCED_PAUSE_FEATURE)
if (heater_idle_timeout_exceeded[HOTEND_INDEX]) {
pid_output = 0;
pid_reset[HOTEND_INDEX] = true;
}
else
#endif
if (pid_error[HOTEND_INDEX] > PID_FUNCTIONAL_RANGE) { if (pid_error[HOTEND_INDEX] > PID_FUNCTIONAL_RANGE) {
pid_output = BANG_MAX; pid_output = BANG_MAX;
pid_reset[HOTEND_INDEX] = true; pid_reset[HOTEND_INDEX] = true;
} }
else if (pid_error[HOTEND_INDEX] < -(PID_FUNCTIONAL_RANGE) || target_temperature[HOTEND_INDEX] == 0) { else if (pid_error[HOTEND_INDEX] < -(PID_FUNCTIONAL_RANGE) || target_temperature[HOTEND_INDEX] == 0
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|| heater_idle_timeout_exceeded[HOTEND_INDEX]
#endif
) {
pid_output = 0; pid_output = 0;
pid_reset[HOTEND_INDEX] = true; pid_reset[HOTEND_INDEX] = true;
} }
@ -622,6 +637,11 @@ float Temperature::get_pid_output(int e) {
#endif // PID_DEBUG #endif // PID_DEBUG
#else /* PID off */ #else /* PID off */
#if ENABLED(ADVANCED_PAUSE_FEATURE)
if (heater_idle_timeout_exceeded[HOTEND_INDEX])
pid_output = 0;
else
#endif
pid_output = (current_temperature[HOTEND_INDEX] < target_temperature[HOTEND_INDEX]) ? PID_MAX : 0; pid_output = (current_temperature[HOTEND_INDEX] < target_temperature[HOTEND_INDEX]) ? PID_MAX : 0;
#endif #endif
@ -699,66 +719,42 @@ void Temperature::manage_heater() {
updateTemperaturesFromRawValues(); // also resets the watchdog updateTemperaturesFromRawValues(); // also resets the watchdog
#if ENABLED(HEATER_0_USES_MAX6675) #if ENABLED(HEATER_0_USES_MAX6675)
if (current_temperature[0] > min(HEATER_0_MAXTEMP, MAX6675_TMAX - 1)) max_temp_error(0); if (current_temperature[0] > min(HEATER_0_MAXTEMP, MAX6675_TMAX - 1.0)) max_temp_error(0);
if (current_temperature[0] < max(HEATER_0_MINTEMP, MAX6675_TMIN + 0.01)) min_temp_error(0); if (current_temperature[0] < max(HEATER_0_MINTEMP, MAX6675_TMIN + .01)) min_temp_error(0);
#endif #endif
#if WATCH_HOTENDS || WATCH_THE_BED || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN #if WATCH_HOTENDS || WATCH_THE_BED || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN || ENABLED(ADVANCED_PAUSE_FEATURE)
millis_t ms = millis(); millis_t ms = millis();
#endif #endif
// Loop through all hotends
HOTEND_LOOP() { HOTEND_LOOP() {
#if ENABLED(ADVANCED_PAUSE_FEATURE)
if (!heater_idle_timeout_exceeded[e] && heater_idle_timeout_ms[e] && ELAPSED(ms, heater_idle_timeout_ms[e]))
heater_idle_timeout_exceeded[e] = true;
#endif
#if ENABLED(THERMAL_PROTECTION_HOTENDS) #if ENABLED(THERMAL_PROTECTION_HOTENDS)
// Check for thermal runaway
thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS); thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS);
#endif #endif
float pid_output = get_pid_output(e); soft_pwm_amount[e] = (current_temperature[e] > minttemp[e] || is_preheating(e)) && current_temperature[e] < maxttemp[e] ? (int)get_pid_output(e) >> 1 : 0;
// Check if temperature is within the correct range
soft_pwm[e] = (current_temperature[e] > minttemp[e] || is_preheating(e)) && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0;
// Check if the temperature is failing to increase
#if WATCH_HOTENDS #if WATCH_HOTENDS
// Make sure temperature is increasing
// Is it time to check this extruder's heater? if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) { // Time to check this extruder?
if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) { if (degHotend(e) < watch_target_temp[e]) // Failed to increase enough?
// Has it failed to increase enough?
if (degHotend(e) < watch_target_temp[e]) {
// Stop!
_temp_error(e, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); _temp_error(e, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
} else // Start again if the target is still far off
else {
// Start again if the target is still far off
start_watching_heater(e); start_watching_heater(e);
} }
} #endif
#endif // THERMAL_PROTECTION_HOTENDS
// Check if the temperature is failing to increase
#if WATCH_THE_BED
// Is it time to check the bed?
if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) {
// Has it failed to increase enough?
if (degBed() < watch_target_bed_temp) {
// Stop!
_temp_error(-1, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
}
else {
// Start again if the target is still far off
start_watching_bed();
}
}
#endif // THERMAL_PROTECTION_HOTENDS
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) { // Make sure measured temperatures are close together
if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF)
_temp_error(0, PSTR(MSG_REDUNDANCY), PSTR(MSG_ERR_REDUNDANT_TEMP)); _temp_error(0, PSTR(MSG_REDUNDANCY), PSTR(MSG_ERR_REDUNDANT_TEMP));
}
#endif #endif
} // HOTEND_LOOP } // HOTEND_LOOP
@ -784,45 +780,71 @@ void Temperature::manage_heater() {
} }
#endif // FILAMENT_WIDTH_SENSOR #endif // FILAMENT_WIDTH_SENSOR
#if WATCH_THE_BED
// Make sure temperature is increasing
if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) { // Time to check the bed?
if (degBed() < watch_target_bed_temp) // Failed to increase enough?
_temp_error(-1, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
else // Start again if the target is still far off
start_watching_bed();
}
#endif // WATCH_THE_BED
#if DISABLED(PIDTEMPBED) #if DISABLED(PIDTEMPBED)
if (PENDING(ms, next_bed_check_ms)) return; if (PENDING(ms, next_bed_check_ms)) return;
next_bed_check_ms = ms + BED_CHECK_INTERVAL; next_bed_check_ms = ms + BED_CHECK_INTERVAL;
#endif #endif
#if TEMP_SENSOR_BED != 0 #if HAS_TEMP_BED
#if ENABLED(ADVANCED_PAUSE_FEATURE)
if (!bed_idle_timeout_exceeded && bed_idle_timeout_ms && ELAPSED(ms, bed_idle_timeout_ms))
bed_idle_timeout_exceeded = true;
#endif
#if HAS_THERMALLY_PROTECTED_BED #if HAS_THERMALLY_PROTECTED_BED
thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS);
#endif #endif
#if ENABLED(PIDTEMPBED) #if ENABLED(ADVANCED_PAUSE_FEATURE)
float pid_output = get_pid_output_bed(); if (bed_idle_timeout_exceeded)
{
soft_pwm_amount_bed = 0;
soft_pwm_bed = WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP) ? (int)pid_output >> 1 : 0; #if DISABLED(PIDTEMPBED)
WRITE_HEATER_BED(LOW);
#endif
}
else
#endif
{
#if ENABLED(PIDTEMPBED)
soft_pwm_amount_bed = WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP) ? (int)get_pid_output_bed() >> 1 : 0;
#elif ENABLED(BED_LIMIT_SWITCHING) #elif ENABLED(BED_LIMIT_SWITCHING)
// Check if temperature is within the correct band // Check if temperature is within the correct band
if (WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP)) { if (WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP)) {
if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS) if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS)
soft_pwm_bed = 0; soft_pwm_amount_bed = 0;
else if (current_temperature_bed <= target_temperature_bed - (BED_HYSTERESIS)) else if (current_temperature_bed <= target_temperature_bed - (BED_HYSTERESIS))
soft_pwm_bed = MAX_BED_POWER >> 1; soft_pwm_amount_bed = MAX_BED_POWER >> 1;
} }
else { else {
soft_pwm_bed = 0; soft_pwm_amount_bed = 0;
WRITE_HEATER_BED(LOW); WRITE_HEATER_BED(LOW);
} }
#else // !PIDTEMPBED && !BED_LIMIT_SWITCHING #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING
// Check if temperature is within the correct range // Check if temperature is within the correct range
if (WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP)) { if (WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP)) {
soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0; soft_pwm_amount_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
} }
else { else {
soft_pwm_bed = 0; soft_pwm_amount_bed = 0;
WRITE_HEATER_BED(LOW); WRITE_HEATER_BED(LOW);
} }
#endif #endif
#endif //TEMP_SENSOR_BED != 0 }
#endif // HAS_TEMP_BED
} }
#define PGM_RD_W(x) (short)pgm_read_word(&x) #define PGM_RD_W(x) (short)pgm_read_word(&x)
@ -960,7 +982,7 @@ void Temperature::updateTemperaturesFromRawValues() {
#ifndef MAX6675_DO_PIN #ifndef MAX6675_DO_PIN
#define MAX6675_DO_PIN MISO_PIN #define MAX6675_DO_PIN MISO_PIN
#endif #endif
Spi<MAX6675_DO_PIN, MOSI_PIN, MAX6675_SCK_PIN> max6675_spi; SPI<MAX6675_DO_PIN, MOSI_PIN, MAX6675_SCK_PIN> max6675_spi;
#endif #endif
/** /**
@ -1205,10 +1227,6 @@ void Temperature::init() {
#if ENABLED(PROBING_HEATERS_OFF) #if ENABLED(PROBING_HEATERS_OFF)
paused = false; paused = false;
ZERO(paused_hotend_temps);
#if HAS_TEMP_BED
paused_bed_temp = 0;
#endif
#endif #endif
} }
@ -1271,11 +1289,29 @@ void Temperature::init() {
SERIAL_ECHOPAIR(" ; Timer:", *timer); SERIAL_ECHOPAIR(" ; Timer:", *timer);
SERIAL_ECHOPAIR(" ; Temperature:", current); SERIAL_ECHOPAIR(" ; Temperature:", current);
SERIAL_ECHOPAIR(" ; Target Temp:", target); SERIAL_ECHOPAIR(" ; Target Temp:", target);
if (heater_id >= 0)
SERIAL_ECHOPAIR(" ; Idle Timeout:", heater_idle_timeout_exceeded[heater_id]);
else
SERIAL_ECHOPAIR(" ; Idle Timeout:", bed_idle_timeout_exceeded);
SERIAL_EOL; SERIAL_EOL;
*/ */
int heater_index = heater_id >= 0 ? heater_id : HOTENDS; int heater_index = heater_id >= 0 ? heater_id : HOTENDS;
#if ENABLED(ADVANCED_PAUSE_FEATURE)
// If the heater idle timeout expires, restart
if (heater_id >= 0 && heater_idle_timeout_exceeded[heater_id]) {
*state = TRInactive;
tr_target_temperature[heater_index] = 0;
}
#if HAS_TEMP_BED
else if (heater_id < 0 && bed_idle_timeout_exceeded) {
*state = TRInactive;
tr_target_temperature[heater_index] = 0;
}
#endif
else
#endif
// If the target temperature changes, restart // If the target temperature changes, restart
if (tr_target_temperature[heater_index] != target) { if (tr_target_temperature[heater_index] != target) {
tr_target_temperature[heater_index] = target; tr_target_temperature[heater_index] = target;
@ -1315,11 +1351,7 @@ void Temperature::disable_all_heaters() {
// Unpause and reset everything // Unpause and reset everything
#if ENABLED(PROBING_HEATERS_OFF) #if ENABLED(PROBING_HEATERS_OFF)
paused = false; pause(false);
ZERO(paused_hotend_temps);
#if HAS_TEMP_BED
paused_bed_temp = 0;
#endif
#endif #endif
// If all heaters go down then for sure our print job has stopped // If all heaters go down then for sure our print job has stopped
@ -1327,7 +1359,7 @@ void Temperature::disable_all_heaters() {
#define DISABLE_HEATER(NR) { \ #define DISABLE_HEATER(NR) { \
setTargetHotend(0, NR); \ setTargetHotend(0, NR); \
soft_pwm[NR] = 0; \ soft_pwm_amount[NR] = 0; \
WRITE_HEATER_ ##NR (LOW); \ WRITE_HEATER_ ##NR (LOW); \
} }
@ -1349,7 +1381,7 @@ void Temperature::disable_all_heaters() {
#if HAS_TEMP_BED #if HAS_TEMP_BED
target_temperature_bed = 0; target_temperature_bed = 0;
soft_pwm_bed = 0; soft_pwm_amount_bed = 0;
#if HAS_HEATER_BED #if HAS_HEATER_BED
WRITE_HEATER_BED(LOW); WRITE_HEATER_BED(LOW);
#endif #endif
@ -1357,43 +1389,26 @@ void Temperature::disable_all_heaters() {
} }
#if ENABLED(PROBING_HEATERS_OFF) #if ENABLED(PROBING_HEATERS_OFF)
void Temperature::pause(bool p) {
if (p && paused) { // If called out of order something is wrong
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Heaters already paused!");
return;
}
if (!p && !paused) {
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Heaters already unpaused!");
return;
}
void Temperature::pause(const bool p) {
if (p != paused) {
paused = p;
if (p) { if (p) {
HOTEND_LOOP() { HOTEND_LOOP() start_heater_idle_timer(e, 0); // timeout immediately
paused_hotend_temps[e] = degTargetHotend(e);
setTargetHotend(0, e);
}
#if HAS_TEMP_BED #if HAS_TEMP_BED
paused_bed_temp = degTargetBed(); start_bed_idle_timer(0); // timeout immediately
setTargetBed(0);
#endif #endif
} }
else { else {
HOTEND_LOOP() setTargetHotend(paused_hotend_temps[e], e); HOTEND_LOOP() reset_heater_idle_timer(e);
#if HAS_TEMP_BED #if HAS_TEMP_BED
setTargetBed(paused_bed_temp); reset_bed_idle_timer();
#endif #endif
} }
paused = p;
} }
bool Temperature::ispaused() {
return paused;
} }
#endif
#endif // PROBING_HEATERS_OFF
#if ENABLED(HEATER_0_USES_MAX6675) #if ENABLED(HEATER_0_USES_MAX6675)
@ -1619,11 +1634,11 @@ void Temperature::isr() {
#if ENABLED(SLOW_PWM_HEATERS) #if ENABLED(SLOW_PWM_HEATERS)
static uint8_t slow_pwm_count = 0; static uint8_t slow_pwm_count = 0;
#define ISR_STATICS(n) \ #define ISR_STATICS(n) \
static uint8_t soft_pwm_ ## n; \ static uint8_t soft_pwm_count_ ## n, \
static uint8_t state_heater_ ## n = 0; \ state_heater_ ## n = 0, \
static uint8_t state_timer_heater_ ## n = 0 state_timer_heater_ ## n = 0
#else #else
#define ISR_STATICS(n) static uint8_t soft_pwm_ ## n = 0 #define ISR_STATICS(n) static uint8_t soft_pwm_count_ ## n = 0
#endif #endif
// Statics per heater // Statics per heater
@ -1662,73 +1677,73 @@ void Temperature::isr() {
*/ */
if (pwm_count_tmp >= 127) { if (pwm_count_tmp >= 127) {
pwm_count_tmp -= 127; pwm_count_tmp -= 127;
soft_pwm_0 = (soft_pwm_0 & pwm_mask) + soft_pwm[0]; soft_pwm_count_0 = (soft_pwm_count_0 & pwm_mask) + soft_pwm_amount[0];
WRITE_HEATER_0(soft_pwm_0 > pwm_mask ? HIGH : LOW); WRITE_HEATER_0(soft_pwm_count_0 > pwm_mask ? HIGH : LOW);
#if HOTENDS > 1 #if HOTENDS > 1
soft_pwm_1 = (soft_pwm_1 & pwm_mask) + soft_pwm[1]; soft_pwm_count_1 = (soft_pwm_count_1 & pwm_mask) + soft_pwm_amount[1];
WRITE_HEATER_1(soft_pwm_1 > pwm_mask ? HIGH : LOW); WRITE_HEATER_1(soft_pwm_count_1 > pwm_mask ? HIGH : LOW);
#if HOTENDS > 2 #if HOTENDS > 2
soft_pwm_2 = (soft_pwm_2 & pwm_mask) + soft_pwm[2]; soft_pwm_count_2 = (soft_pwm_count_2 & pwm_mask) + soft_pwm_amount[2];
WRITE_HEATER_2(soft_pwm_2 > pwm_mask ? HIGH : LOW); WRITE_HEATER_2(soft_pwm_count_2 > pwm_mask ? HIGH : LOW);
#if HOTENDS > 3 #if HOTENDS > 3
soft_pwm_3 = (soft_pwm_3 & pwm_mask) + soft_pwm[3]; soft_pwm_count_3 = (soft_pwm_count_3 & pwm_mask) + soft_pwm_amount[3];
WRITE_HEATER_3(soft_pwm_3 > pwm_mask ? HIGH : LOW); WRITE_HEATER_3(soft_pwm_count_3 > pwm_mask ? HIGH : LOW);
#if HOTENDS > 4 #if HOTENDS > 4
soft_pwm_4 = (soft_pwm_4 & pwm_mask) + soft_pwm[4]; soft_pwm_count_4 = (soft_pwm_count_4 & pwm_mask) + soft_pwm_amount[4];
WRITE_HEATER_4(soft_pwm_4 > pwm_mask ? HIGH : LOW); WRITE_HEATER_4(soft_pwm_count_4 > pwm_mask ? HIGH : LOW);
#endif // HOTENDS > 4 #endif // HOTENDS > 4
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if HAS_HEATER_BED #if HAS_HEATER_BED
soft_pwm_BED = (soft_pwm_BED & pwm_mask) + soft_pwm_bed; soft_pwm_count_BED = (soft_pwm_count_BED & pwm_mask) + soft_pwm_amount_bed;
WRITE_HEATER_BED(soft_pwm_BED > pwm_mask ? HIGH : LOW); WRITE_HEATER_BED(soft_pwm_count_BED > pwm_mask ? HIGH : LOW);
#endif #endif
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
#if HAS_FAN0 #if HAS_FAN0
soft_pwm_fan[0] = (soft_pwm_fan[0] & pwm_mask) + fanSpeedSoftPwm[0] >> 1; soft_pwm_count_fan[0] = (soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0] >> 1;
WRITE_FAN(soft_pwm_fan[0] > pwm_mask ? HIGH : LOW); WRITE_FAN(soft_pwm_count_fan[0] > pwm_mask ? HIGH : LOW);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
soft_pwm_fan[1] = (soft_pwm_fan[1] & pwm_mask) + fanSpeedSoftPwm[1] >> 1; soft_pwm_count_fan[1] = (soft_pwm_count_fan[1] & pwm_mask) + soft_pwm_amount_fan[1] >> 1;
WRITE_FAN1(soft_pwm_fan[1] > pwm_mask ? HIGH : LOW); WRITE_FAN1(soft_pwm_count_fan[1] > pwm_mask ? HIGH : LOW);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
soft_pwm_fan[2] = (soft_pwm_fan[2] & pwm_mask) + fanSpeedSoftPwm[2] >> 1; soft_pwm_count_fan[2] = (soft_pwm_count_fan[2] & pwm_mask) + soft_pwm_amount_fan[2] >> 1;
WRITE_FAN2(soft_pwm_fan[2] > pwm_mask ? HIGH : LOW); WRITE_FAN2(soft_pwm_count_fan[2] > pwm_mask ? HIGH : LOW);
#endif #endif
#endif #endif
} }
else { else {
if (soft_pwm_0 <= pwm_count_tmp) WRITE_HEATER_0(0); if (soft_pwm_count_0 <= pwm_count_tmp) WRITE_HEATER_0(0);
#if HOTENDS > 1 #if HOTENDS > 1
if (soft_pwm_1 <= pwm_count_tmp) WRITE_HEATER_1(0); if (soft_pwm_count_1 <= pwm_count_tmp) WRITE_HEATER_1(0);
#if HOTENDS > 2 #if HOTENDS > 2
if (soft_pwm_2 <= pwm_count_tmp) WRITE_HEATER_2(0); if (soft_pwm_count_2 <= pwm_count_tmp) WRITE_HEATER_2(0);
#if HOTENDS > 3 #if HOTENDS > 3
if (soft_pwm_3 <= pwm_count_tmp) WRITE_HEATER_3(0); if (soft_pwm_count_3 <= pwm_count_tmp) WRITE_HEATER_3(0);
#if HOTENDS > 4 #if HOTENDS > 4
if (soft_pwm_4 <= pwm_count_tmp) WRITE_HEATER_4(0); if (soft_pwm_count_4 <= pwm_count_tmp) WRITE_HEATER_4(0);
#endif // HOTENDS > 4 #endif // HOTENDS > 4
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if HAS_HEATER_BED #if HAS_HEATER_BED
if (soft_pwm_BED <= pwm_count_tmp) WRITE_HEATER_BED(0); if (soft_pwm_count_BED <= pwm_count_tmp) WRITE_HEATER_BED(0);
#endif #endif
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
#if HAS_FAN0 #if HAS_FAN0
if (soft_pwm_fan[0] <= pwm_count_tmp) WRITE_FAN(0); if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
if (soft_pwm_fan[1] <= pwm_count_tmp) WRITE_FAN1(0); if (soft_pwm_count_fan[1] <= pwm_count_tmp) WRITE_FAN1(0);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
if (soft_pwm_fan[2] <= pwm_count_tmp) WRITE_FAN2(0); if (soft_pwm_count_fan[2] <= pwm_count_tmp) WRITE_FAN2(0);
#endif #endif
#endif #endif
} }
@ -1771,7 +1786,7 @@ void Temperature::isr() {
WRITE_HEATER_ ##NR(0); \ WRITE_HEATER_ ##NR(0); \
} \ } \
} }
#define SLOW_PWM_ROUTINE(n) _SLOW_PWM_ROUTINE(n, soft_pwm[n]) #define SLOW_PWM_ROUTINE(n) _SLOW_PWM_ROUTINE(n, soft_pwm_amount[n])
#define PWM_OFF_ROUTINE(NR) \ #define PWM_OFF_ROUTINE(NR) \
if (soft_pwm_ ##NR < slow_pwm_count) { \ if (soft_pwm_ ##NR < slow_pwm_count) { \
@ -1798,7 +1813,7 @@ void Temperature::isr() {
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if HAS_HEATER_BED #if HAS_HEATER_BED
_SLOW_PWM_ROUTINE(BED, soft_pwm_bed); // BED _SLOW_PWM_ROUTINE(BED, soft_pwm_amount_bed); // BED
#endif #endif
} // slow_pwm_count == 0 } // slow_pwm_count == 0
@ -1824,26 +1839,26 @@ void Temperature::isr() {
if (pwm_count_tmp >= 127) { if (pwm_count_tmp >= 127) {
pwm_count_tmp = 0; pwm_count_tmp = 0;
#if HAS_FAN0 #if HAS_FAN0
soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1; soft_pwm_count_fan[0] = soft_pwm_amount_fan[0] >> 1;
WRITE_FAN(soft_pwm_fan[0] > 0 ? HIGH : LOW); WRITE_FAN(soft_pwm_count_fan[0] > 0 ? HIGH : LOW);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1; soft_pwm_count_fan[1] = soft_pwm_amount_fan[1] >> 1;
WRITE_FAN1(soft_pwm_fan[1] > 0 ? HIGH : LOW); WRITE_FAN1(soft_pwm_count_fan[1] > 0 ? HIGH : LOW);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1; soft_pwm_count_fan[2] = soft_pwm_amount_fan[2] >> 1;
WRITE_FAN2(soft_pwm_fan[2] > 0 ? HIGH : LOW); WRITE_FAN2(soft_pwm_count_fan[2] > 0 ? HIGH : LOW);
#endif #endif
} }
#if HAS_FAN0 #if HAS_FAN0
if (soft_pwm_fan[0] <= pwm_count_tmp) WRITE_FAN(0); if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
if (soft_pwm_fan[1] <= pwm_count_tmp) WRITE_FAN1(0); if (soft_pwm_count_fan[1] <= pwm_count_tmp) WRITE_FAN1(0);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
if (soft_pwm_fan[2] <= pwm_count_tmp) WRITE_FAN2(0); if (soft_pwm_count_fan[2] <= pwm_count_tmp) WRITE_FAN2(0);
#endif #endif
#endif // FAN_SOFT_PWM #endif // FAN_SOFT_PWM
@ -2062,15 +2077,14 @@ void Temperature::isr() {
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
LOOP_XYZ(axis) { LOOP_XYZ(axis) {
int curTodo = babystepsTodo[axis]; //get rid of volatile for performance const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance
if (curTodo > 0) { if (curTodo > 0) {
stepper.babystep((AxisEnum)axis, /*fwd*/true); stepper.babystep((AxisEnum)axis, /*fwd*/true);
babystepsTodo[axis]--; //fewer to do next time babystepsTodo[axis]--;
} }
else if (curTodo < 0) { else if (curTodo < 0) {
stepper.babystep((AxisEnum)axis, /*fwd*/false); stepper.babystep((AxisEnum)axis, /*fwd*/false);
babystepsTodo[axis]++; //fewer to do next time babystepsTodo[axis]++;
} }
} }
#endif // BABYSTEPPING #endif // BABYSTEPPING

@ -92,6 +92,10 @@ enum ADCSensorState {
#define ACTUAL_ADC_SAMPLES max(int(MIN_ADC_ISR_LOOPS), int(SensorsReady)) #define ACTUAL_ADC_SAMPLES max(int(MIN_ADC_ISR_LOOPS), int(SensorsReady))
#if !HAS_HEATER_BED
constexpr int16_t target_temperature_bed = 0;
#endif
class Temperature { class Temperature {
public: public:
@ -100,8 +104,11 @@ class Temperature {
current_temperature_bed; current_temperature_bed;
static int16_t current_temperature_raw[HOTENDS], static int16_t current_temperature_raw[HOTENDS],
target_temperature[HOTENDS], target_temperature[HOTENDS],
current_temperature_bed_raw, current_temperature_bed_raw;
target_temperature_bed;
#if HAS_HEATER_BED
static int16_t target_temperature_bed;
#endif
static volatile bool in_temp_isr; static volatile bool in_temp_isr;
@ -109,10 +116,12 @@ class Temperature {
static float redundant_temperature; static float redundant_temperature;
#endif #endif
static uint8_t soft_pwm_bed; static uint8_t soft_pwm_amount[HOTENDS],
soft_pwm_amount_bed;
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
static uint8_t fanSpeedSoftPwm[FAN_COUNT]; static uint8_t soft_pwm_amount_fan[FAN_COUNT],
soft_pwm_count_fan[FAN_COUNT];
#endif #endif
#if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
@ -156,18 +165,18 @@ class Temperature {
#endif #endif
#if WATCH_HOTENDS #if WATCH_HOTENDS
static int watch_target_temp[HOTENDS]; static uint16_t watch_target_temp[HOTENDS];
static millis_t watch_heater_next_ms[HOTENDS]; static millis_t watch_heater_next_ms[HOTENDS];
#endif #endif
#if WATCH_THE_BED #if WATCH_THE_BED
static int watch_target_bed_temp; static uint16_t watch_target_bed_temp;
static millis_t watch_bed_next_ms; static millis_t watch_bed_next_ms;
#endif #endif
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
static bool allow_cold_extrude; static bool allow_cold_extrude;
static float extrude_min_temp; static uint16_t extrude_min_temp;
static bool tooColdToExtrude(uint8_t e) { static bool tooColdToExtrude(uint8_t e) {
#if HOTENDS == 1 #if HOTENDS == 1
UNUSED(e); UNUSED(e);
@ -181,7 +190,7 @@ class Temperature {
private: private:
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
static int redundant_temperature_raw; static uint16_t redundant_temperature_raw;
static float redundant_temperature; static float redundant_temperature;
#endif #endif
@ -249,22 +258,20 @@ class Temperature {
static millis_t next_auto_fan_check_ms; static millis_t next_auto_fan_check_ms;
#endif #endif
static uint8_t soft_pwm[HOTENDS];
#if ENABLED(FAN_SOFT_PWM)
static uint8_t soft_pwm_fan[FAN_COUNT];
#endif
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
static int current_raw_filwidth; //Holds measured filament diameter - one extruder only static int current_raw_filwidth; //Holds measured filament diameter - one extruder only
#endif #endif
#if ENABLED(PROBING_HEATERS_OFF) #if ENABLED(PROBING_HEATERS_OFF)
static bool paused; static bool paused;
static int16_t paused_hotend_temps[HOTENDS]; #endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
static millis_t heater_idle_timeout_ms[HOTENDS];
static bool heater_idle_timeout_exceeded[HOTENDS];
#if HAS_TEMP_BED #if HAS_TEMP_BED
static int16_t paused_bed_temp; static millis_t bed_idle_timeout_ms;
static bool bed_idle_timeout_exceeded;
#endif #endif
#endif #endif
@ -292,8 +299,7 @@ class Temperature {
/** /**
* Call periodically to manage heaters * Call periodically to manage heaters
*/ */
//static void manage_heater(); // changed to address compiler error static void manage_heater() _O2; // Added _O2 to work around a compiler error
static void manage_heater() __attribute__((__optimize__("O2")));
/** /**
* Preheating hotends * Preheating hotends
@ -331,13 +337,13 @@ class Temperature {
//inline so that there is no performance decrease. //inline so that there is no performance decrease.
//deg=degreeCelsius //deg=degreeCelsius
static int16_t degHotend(uint8_t e) { static float degHotend(uint8_t e) {
#if HOTENDS == 1 #if HOTENDS == 1
UNUSED(e); UNUSED(e);
#endif #endif
return current_temperature[HOTEND_INDEX]; return current_temperature[HOTEND_INDEX];
} }
static int16_t degBed() { return current_temperature_bed; } static float degBed() { return current_temperature_bed; }
#if ENABLED(SHOW_TEMP_ADC_VALUES) #if ENABLED(SHOW_TEMP_ADC_VALUES)
static int16_t rawHotendTemp(uint8_t e) { static int16_t rawHotendTemp(uint8_t e) {
@ -383,10 +389,18 @@ class Temperature {
} }
static void setTargetBed(const int16_t celsius) { static void setTargetBed(const int16_t celsius) {
target_temperature_bed = celsius; #if HAS_HEATER_BED
target_temperature_bed =
#ifdef BED_MAXTEMP
min(celsius, BED_MAXTEMP)
#else
celsius
#endif
;
#if WATCH_THE_BED #if WATCH_THE_BED
start_watching_bed(); start_watching_bed();
#endif #endif
#endif
} }
static bool isHeatingHotend(uint8_t e) { static bool isHeatingHotend(uint8_t e) {
@ -462,8 +476,55 @@ class Temperature {
#endif // BABYSTEPPING #endif // BABYSTEPPING
#if ENABLED(PROBING_HEATERS_OFF) #if ENABLED(PROBING_HEATERS_OFF)
static void pause(bool p); static void pause(const bool p);
static bool ispaused(); static bool is_paused() { return paused; }
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
static void start_heater_idle_timer(uint8_t e, millis_t timeout_ms) {
#if HOTENDS == 1
UNUSED(e);
#endif
heater_idle_timeout_ms[HOTEND_INDEX] = millis() + timeout_ms;
heater_idle_timeout_exceeded[HOTEND_INDEX] = false;
}
static void reset_heater_idle_timer(uint8_t e) {
#if HOTENDS == 1
UNUSED(e);
#endif
heater_idle_timeout_ms[HOTEND_INDEX] = 0;
heater_idle_timeout_exceeded[HOTEND_INDEX] = false;
#if WATCH_HOTENDS
start_watching_heater(HOTEND_INDEX);
#endif
}
static bool is_heater_idle(uint8_t e) {
#if HOTENDS == 1
UNUSED(e);
#endif
return heater_idle_timeout_exceeded[HOTEND_INDEX];
}
#if HAS_TEMP_BED
static void start_bed_idle_timer(millis_t timeout_ms) {
bed_idle_timeout_ms = millis() + timeout_ms;
bed_idle_timeout_exceeded = false;
}
static void reset_bed_idle_timer() {
bed_idle_timeout_ms = 0;
bed_idle_timeout_exceeded = false;
#if WATCH_THE_BED
start_watching_bed();
#endif
}
static bool is_bed_idle() {
return bed_idle_timeout_exceeded;
}
#endif
#endif #endif
private: private:

@ -89,7 +89,7 @@
#include "thermistortable_52.h" #include "thermistortable_52.h"
#endif #endif
#if ANY_THERMISTOR_IS(55) // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) #if ANY_THERMISTOR_IS(55) // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
#include "thermistortable_53.h" #include "thermistortable_55.h"
#endif #endif
#if ANY_THERMISTOR_IS(60) // Maker's Tool Works Kapton Bed Thermistor #if ANY_THERMISTOR_IS(60) // Maker's Tool Works Kapton Bed Thermistor
#include "thermistortable_60.h" #include "thermistortable_60.h"

@ -29,6 +29,8 @@
#include "hex_print_routines.h" #include "hex_print_routines.h"
#include "temperature.h" #include "temperature.h"
extern Planner planner;
/** /**
* These support functions allow the use of large bit arrays of flags that take very * These support functions allow the use of large bit arrays of flags that take very
* little RAM. Currently they are limited to being 16x16 in size. Changing the declaration * little RAM. Currently they are limited to being 16x16 in size. Changing the declaration
@ -41,7 +43,17 @@
uint8_t ubl_cnt = 0; uint8_t ubl_cnt = 0;
static void serial_echo_xy(const uint16_t x, const uint16_t y) { void unified_bed_leveling::echo_name() { SERIAL_PROTOCOLPGM("Unified Bed Leveling"); }
void unified_bed_leveling::report_state() {
echo_name();
SERIAL_PROTOCOLPGM(" System v" UBL_VERSION " ");
if (!state.active) SERIAL_PROTOCOLPGM("in");
SERIAL_PROTOCOLLNPGM("active.");
safe_delay(50);
}
static void serial_echo_xy(const int16_t x, const int16_t y) {
SERIAL_CHAR('('); SERIAL_CHAR('(');
SERIAL_ECHO(x); SERIAL_ECHO(x);
SERIAL_CHAR(','); SERIAL_CHAR(',');
@ -57,72 +69,27 @@
// 15 is the maximum nubmer of grid points supported + 1 safety margin for now, // 15 is the maximum nubmer of grid points supported + 1 safety margin for now,
// until determinism prevails // until determinism prevails
constexpr float unified_bed_leveling::mesh_index_to_xpos[16], constexpr float unified_bed_leveling::_mesh_index_to_xpos[16],
unified_bed_leveling::mesh_index_to_ypos[16]; unified_bed_leveling::_mesh_index_to_ypos[16];
bool unified_bed_leveling::g26_debug_flag = false, bool unified_bed_leveling::g26_debug_flag = false,
unified_bed_leveling::has_control_of_lcd_panel = false; unified_bed_leveling::has_control_of_lcd_panel = false;
int16_t unified_bed_leveling::eeprom_start = -1; // Please stop changing this to 8 bits in size
// It needs to hold values bigger than this.
volatile int unified_bed_leveling::encoder_diff; volatile int unified_bed_leveling::encoder_diff;
unified_bed_leveling::unified_bed_leveling() { unified_bed_leveling::unified_bed_leveling() {
ubl_cnt++; // Debug counter to insure we only have one UBL object present in memory. ubl_cnt++; // Debug counter to insure we only have one UBL object present in memory. We can eliminate this (and all references to ubl_cnt) very soon.
reset();
}
void unified_bed_leveling::load_mesh(const int16_t slot) {
int16_t j = (UBL_LAST_EEPROM_INDEX - eeprom_start) / sizeof(z_values);
if (slot == -1) {
SERIAL_PROTOCOLLNPGM("?No mesh saved in EEPROM. Zeroing mesh in memory.\n");
reset(); reset();
return;
}
if (!WITHIN(slot, 0, j - 1) || eeprom_start <= 0) {
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available to load mesh.\n");
return;
}
j = UBL_LAST_EEPROM_INDEX - (slot + 1) * sizeof(z_values);
eeprom_read_block((void *)&z_values, (void *)j, sizeof(z_values));
SERIAL_PROTOCOLPAIR("Mesh loaded from slot ", slot);
SERIAL_PROTOCOLLNPAIR(" at offset ", hex_address((void*)j));
}
void unified_bed_leveling::store_mesh(const int16_t slot) {
int16_t j = (UBL_LAST_EEPROM_INDEX - eeprom_start) / sizeof(z_values);
if (!WITHIN(slot, 0, j - 1) || eeprom_start <= 0) {
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available to load mesh.\n");
SERIAL_PROTOCOL(slot);
SERIAL_PROTOCOLLNPGM(" mesh slots available.\n");
SERIAL_PROTOCOLLNPAIR("E2END : ", E2END);
SERIAL_PROTOCOLLNPAIR("k : ", (int)UBL_LAST_EEPROM_INDEX);
SERIAL_PROTOCOLLNPAIR("j : ", j);
SERIAL_PROTOCOLLNPAIR("m : ", slot);
SERIAL_EOL;
return;
}
j = UBL_LAST_EEPROM_INDEX - (slot + 1) * sizeof(z_values);
eeprom_write_block((const void *)&z_values, (void *)j, sizeof(z_values));
SERIAL_PROTOCOLPAIR("Mesh saved in slot ", slot);
SERIAL_PROTOCOLLNPAIR(" at offset ", hex_address((void*)j));
} }
void unified_bed_leveling::reset() { void unified_bed_leveling::reset() {
state.active = false; state.active = false;
state.z_offset = 0; state.z_offset = 0;
state.eeprom_storage_slot = -1; state.storage_slot = -1;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
planner.z_fade_height = 10.0;
#endif
ZERO(z_values); ZERO(z_values);
last_specified_z = -999.9; last_specified_z = -999.9;
} }
@ -136,7 +103,7 @@
void unified_bed_leveling::display_map(const int map_type) { void unified_bed_leveling::display_map(const int map_type) {
const bool map0 = map_type == 0; const bool map0 = map_type == 0;
constexpr uint8_t spaces = 11 * (GRID_MAX_POINTS_X - 2); constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2);
if (map0) { if (map0) {
SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n"); SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n");
@ -145,13 +112,13 @@
serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
SERIAL_EOL; SERIAL_EOL;
serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MAX_Y); serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MAX_Y);
SERIAL_ECHO_SP(spaces - 3); SERIAL_ECHO_SP(spaces);
serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y);
SERIAL_EOL; SERIAL_EOL;
} }
const float current_xi = ubl.get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0), const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
current_yi = ubl.get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0); current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) { for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) {
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
@ -190,7 +157,7 @@
if (map0) { if (map0) {
serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y); serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
SERIAL_ECHO_SP(spaces + 1); SERIAL_ECHO_SP(spaces + 4);
serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y);
SERIAL_EOL; SERIAL_EOL;
serial_echo_xy(0, 0); serial_echo_xy(0, 0);
@ -203,9 +170,9 @@
bool unified_bed_leveling::sanity_check() { bool unified_bed_leveling::sanity_check() {
uint8_t error_flag = 0; uint8_t error_flag = 0;
const int j = (UBL_LAST_EEPROM_INDEX - eeprom_start) / sizeof(z_values); const int a = settings.calc_num_meshes();
if (j < 1) { if (a < 1) {
SERIAL_PROTOCOLLNPGM("?No EEPROM storage available for a mesh of this size.\n"); SERIAL_PROTOCOLLNPGM("?Insufficient EEPROM storage for a mesh of this size.");
error_flag++; error_flag++;
} }

@ -30,11 +30,15 @@
#include "planner.h" #include "planner.h"
#include "math.h" #include "math.h"
#include "vector_3.h" #include "vector_3.h"
#include "configuration_store.h"
#define UBL_VERSION "1.00" #define UBL_VERSION "1.01"
#define UBL_OK false #define UBL_OK false
#define UBL_ERR true #define UBL_ERR true
#define USE_NOZZLE_AS_REFERENCE 0
#define USE_PROBE_AS_REFERENCE 1
typedef struct { typedef struct {
int8_t x_index, y_index; int8_t x_index, y_index;
float distance; // When populated, the distance from the search location float distance; // When populated, the distance from the search location
@ -49,31 +53,16 @@
// ubl_motion.cpp // ubl_motion.cpp
void debug_current_and_destination(const char * const title); void debug_current_and_destination(const char * const title);
void ubl_line_to_destination(const float&, uint8_t);
// ubl_G29.cpp // ubl_G29.cpp
enum MeshPointType { INVALID, REAL, SET_IN_BITMAP }; enum MeshPointType { INVALID, REAL, SET_IN_BITMAP };
void dump(char * const str, const float &f);
void probe_entire_mesh(const float&, const float&, const bool, const bool, const bool);
void manually_probe_remaining_mesh(const float&, const float&, const float&, const float&, const bool);
float measure_business_card_thickness(const float&);
mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const float&, const float&, const bool, unsigned int[16], bool);
void shift_mesh_height();
void fine_tune_mesh(const float&, const float&, const bool);
bool g29_parameter_parsing();
void g29_what_command();
void g29_eeprom_dump();
void g29_compare_current_mesh_to_stored_mesh();
// External references // External references
char *ftostr43sign(const float&, char); char *ftostr43sign(const float&, char);
bool ubl_lcd_clicked(); bool ubl_lcd_clicked();
void home_all_axes(); void home_all_axes();
void gcode_G26();
void gcode_G29();
extern uint8_t ubl_cnt; extern uint8_t ubl_cnt;
@ -90,7 +79,7 @@
typedef struct { typedef struct {
bool active = false; bool active = false;
float z_offset = 0.0; float z_offset = 0.0;
int8_t eeprom_storage_slot = -1; int8_t storage_slot = -1;
} ubl_state; } ubl_state;
class unified_bed_leveling { class unified_bed_leveling {
@ -98,29 +87,81 @@
static float last_specified_z; static float last_specified_z;
static int g29_verbose_level,
g29_phase_value,
g29_repetition_cnt,
g29_storage_slot,
g29_map_type,
g29_grid_size;
static bool g29_c_flag, g29_x_flag, g29_y_flag;
static float g29_x_pos, g29_y_pos,
g29_card_thickness,
g29_constant;
#if ENABLED(UBL_G26_MESH_VALIDATION)
static float g26_extrusion_multiplier,
g26_retraction_multiplier,
g26_nozzle,
g26_filament_diameter,
g26_prime_length,
g26_x_pos, g26_y_pos,
g26_ooze_amount,
g26_layer_height;
static int16_t g26_bed_temp,
g26_hotend_temp,
g26_repeats;
static int8_t g26_prime_flag;
static bool g26_continue_with_closest, g26_keep_heaters_on;
#endif
static float measure_point_with_encoder();
static float measure_business_card_thickness(float&);
static bool g29_parameter_parsing();
static void find_mean_mesh_height();
static void shift_mesh_height();
static void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest);
static void manually_probe_remaining_mesh(const float&, const float&, const float&, const float&, const bool);
static void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3);
static void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map);
static void g29_what_command();
static void g29_eeprom_dump();
static void g29_compare_current_mesh_to_stored_mesh();
static void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map);
static bool smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir);
static void smart_fill_mesh();
#if ENABLED(UBL_G26_MESH_VALIDATION)
static bool exit_from_g26();
static bool parse_G26_parameters();
static void G26_line_to_destination(const float &feed_rate);
static mesh_index_pair find_closest_circle_to_print(const float&, const float&);
static bool look_for_lines_to_connect();
static bool turn_on_heaters();
static bool prime_nozzle();
static void retract_filament(float where[XYZE]);
static void recover_filament(float where[XYZE]);
static void print_line_from_here_to_there(const float&, const float&, const float&, const float&, const float&, const float&);
static void move_to(const float&, const float&, const float&, const float&);
#endif
public: public:
void find_mean_mesh_height(); static void echo_name();
void shift_mesh_height(); static void report_state();
void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest); static void save_ubl_active_state_and_disable();
void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3); static void restore_ubl_active_state_and_leave();
void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map); static void display_map(const int);
void manually_probe_remaining_mesh(const float &lx, const float &ly, const float &z_clearance, const float &card_thickness, const bool do_ubl_mesh_map); static mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const float&, const float&, const bool, unsigned int[16], bool);
void save_ubl_active_state_and_disable(); static void reset();
void restore_ubl_active_state_and_leave(); static void invalidate();
void g29_what_command(); static bool sanity_check();
void g29_eeprom_dump() ;
void g29_compare_current_mesh_to_stored_mesh(); static void G29() _O0; // O0 for no optimization
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map); static void smart_fill_wlsf(const float &) _O2; // O2 gives smaller code than Os on A2560
void smart_fill_mesh();
void display_map(const int); #if ENABLED(UBL_G26_MESH_VALIDATION)
void reset(); static void G26();
void invalidate(); #endif
void store_state();
void load_state();
void store_mesh(const int16_t);
void load_mesh(const int16_t);
bool sanity_check();
static ubl_state state; static ubl_state state;
@ -128,7 +169,7 @@
// 15 is the maximum nubmer of grid points supported + 1 safety margin for now, // 15 is the maximum nubmer of grid points supported + 1 safety margin for now,
// until determinism prevails // until determinism prevails
constexpr static float mesh_index_to_xpos[16] PROGMEM = { constexpr static float _mesh_index_to_xpos[16] PROGMEM = {
UBL_MESH_MIN_X + 0 * (MESH_X_DIST), UBL_MESH_MIN_X + 1 * (MESH_X_DIST), UBL_MESH_MIN_X + 0 * (MESH_X_DIST), UBL_MESH_MIN_X + 1 * (MESH_X_DIST),
UBL_MESH_MIN_X + 2 * (MESH_X_DIST), UBL_MESH_MIN_X + 3 * (MESH_X_DIST), UBL_MESH_MIN_X + 2 * (MESH_X_DIST), UBL_MESH_MIN_X + 3 * (MESH_X_DIST),
UBL_MESH_MIN_X + 4 * (MESH_X_DIST), UBL_MESH_MIN_X + 5 * (MESH_X_DIST), UBL_MESH_MIN_X + 4 * (MESH_X_DIST), UBL_MESH_MIN_X + 5 * (MESH_X_DIST),
@ -139,7 +180,7 @@
UBL_MESH_MIN_X + 14 * (MESH_X_DIST), UBL_MESH_MIN_X + 15 * (MESH_X_DIST) UBL_MESH_MIN_X + 14 * (MESH_X_DIST), UBL_MESH_MIN_X + 15 * (MESH_X_DIST)
}; };
constexpr static float mesh_index_to_ypos[16] PROGMEM = { constexpr static float _mesh_index_to_ypos[16] PROGMEM = {
UBL_MESH_MIN_Y + 0 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 1 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 0 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 1 * (MESH_Y_DIST),
UBL_MESH_MIN_Y + 2 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 3 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 2 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 3 * (MESH_Y_DIST),
UBL_MESH_MIN_Y + 4 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 5 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 4 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 5 * (MESH_Y_DIST),
@ -152,22 +193,20 @@
static bool g26_debug_flag, has_control_of_lcd_panel; static bool g26_debug_flag, has_control_of_lcd_panel;
static int16_t eeprom_start; // Please do no change this to 8 bits in size
// It needs to hold values bigger than this.
static volatile int encoder_diff; // Volatile because it's changed at interrupt time. static volatile int encoder_diff; // Volatile because it's changed at interrupt time.
unified_bed_leveling(); unified_bed_leveling();
FORCE_INLINE void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; } FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
int8_t get_cell_index_x(const float &x) {
static int8_t get_cell_index_x(const float &x) {
const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST)); const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
return constrain(cx, 0, (GRID_MAX_POINTS_X) - 1); // -1 is appropriate if we want all movement to the X_MAX 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 } // position. But with this defined this way, it is possible
// to extrapolate off of this point even further out. Probably // to extrapolate off of this point even further out. Probably
// that is OK because something else should be keeping that from // that is OK because something else should be keeping that from
// happening and should not be worried about at this level. // happening and should not be worried about at this level.
int8_t get_cell_index_y(const float &y) { static int8_t get_cell_index_y(const float &y) {
const int8_t cy = (y - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST)); const int8_t cy = (y - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_Y_DIST));
return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 1); // -1 is appropriate if we want all movement to the Y_MAX 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 } // position. But with this defined this way, it is possible
@ -175,12 +214,12 @@
// that is OK because something else should be keeping that from // that is OK because something else should be keeping that from
// happening and should not be worried about at this level. // happening and should not be worried about at this level.
int8_t find_closest_x_index(const float &x) { static int8_t find_closest_x_index(const float &x) {
const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST)); const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1; return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
} }
int8_t find_closest_y_index(const float &y) { static int8_t find_closest_y_index(const float &y) {
const int8_t py = (y - (UBL_MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST)); const int8_t py = (y - (UBL_MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * (1.0 / (MESH_Y_DIST));
return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1; return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1;
} }
@ -200,7 +239,7 @@
* It is fairly expensive with its 4 floating point additions and 2 floating point * It is fairly expensive with its 4 floating point additions and 2 floating point
* multiplications. * multiplications.
*/ */
FORCE_INLINE float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) { FORCE_INLINE static float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1); return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1);
} }
@ -208,9 +247,10 @@
* z_correction_for_x_on_horizontal_mesh_line is an optimization for * z_correction_for_x_on_horizontal_mesh_line is an optimization for
* the rare occasion when a point lies exactly on a Mesh line (denoted by index yi). * the rare occasion when a point lies exactly on a Mesh line (denoted by index yi).
*/ */
inline float z_correction_for_x_on_horizontal_mesh_line(const float &lx0, const int x1_i, const int yi) { inline static float z_correction_for_x_on_horizontal_mesh_line(const float &lx0, const int x1_i, const int yi) {
if (!WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(yi, 0, GRID_MAX_POINTS_Y - 1)) { if (!WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(yi, 0, GRID_MAX_POINTS_Y - 1)) {
SERIAL_ECHOPAIR("? in z_correction_for_x_on_horizontal_mesh_line(lx0=", lx0); serialprintPGM( !WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) ? PSTR("x1l_i") : PSTR("yi") );
SERIAL_ECHOPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(lx0=", lx0);
SERIAL_ECHOPAIR(",x1_i=", x1_i); SERIAL_ECHOPAIR(",x1_i=", x1_i);
SERIAL_ECHOPAIR(",yi=", yi); SERIAL_ECHOPAIR(",yi=", yi);
SERIAL_CHAR(')'); SERIAL_CHAR(')');
@ -218,7 +258,7 @@
return NAN; return NAN;
} }
const float xratio = (RAW_X_POSITION(lx0) - pgm_read_float(&mesh_index_to_xpos[x1_i])) * (1.0 / (MESH_X_DIST)), const float xratio = (RAW_X_POSITION(lx0) - mesh_index_to_xpos(x1_i)) * (1.0 / (MESH_X_DIST)),
z1 = z_values[x1_i][yi]; z1 = z_values[x1_i][yi];
return z1 + xratio * (z_values[x1_i + 1][yi] - z1); return z1 + xratio * (z_values[x1_i + 1][yi] - z1);
@ -227,17 +267,18 @@
// //
// See comments above for z_correction_for_x_on_horizontal_mesh_line // See comments above for z_correction_for_x_on_horizontal_mesh_line
// //
inline float z_correction_for_y_on_vertical_mesh_line(const float &ly0, const int xi, const int y1_i) { inline static float z_correction_for_y_on_vertical_mesh_line(const float &ly0, const int xi, const int y1_i) {
if (!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(y1_i, 0, GRID_MAX_POINTS_Y - 1)) { if (!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(y1_i, 0, GRID_MAX_POINTS_Y - 1)) {
SERIAL_ECHOPAIR("? in get_z_correction_along_vertical_mesh_line_at_specific_x(ly0=", ly0); serialprintPGM( !WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) ? PSTR("xi") : PSTR("yl_i") );
SERIAL_ECHOPAIR(", x1_i=", xi); SERIAL_ECHOPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ly0=", ly0);
SERIAL_ECHOPAIR(", yi=", y1_i); SERIAL_ECHOPAIR(", xi=", xi);
SERIAL_ECHOPAIR(", y1_i=", y1_i);
SERIAL_CHAR(')'); SERIAL_CHAR(')');
SERIAL_EOL; SERIAL_EOL;
return NAN; return NAN;
} }
const float yratio = (RAW_Y_POSITION(ly0) - pgm_read_float(&mesh_index_to_ypos[y1_i])) * (1.0 / (MESH_Y_DIST)), const float yratio = (RAW_Y_POSITION(ly0) - mesh_index_to_ypos(y1_i)) * (1.0 / (MESH_Y_DIST)),
z1 = z_values[xi][y1_i]; z1 = z_values[xi][y1_i];
return z1 + yratio * (z_values[xi][y1_i + 1] - z1); return z1 + yratio * (z_values[xi][y1_i + 1] - z1);
@ -249,7 +290,7 @@
* Z-Height at both ends. Then it does a linear interpolation of these heights based * Z-Height at both ends. Then it does a linear interpolation of these heights based
* on the Y position within the cell. * on the Y position within the cell.
*/ */
float get_z_correction(const float &lx0, const float &ly0) { static float get_z_correction(const float &lx0, const float &ly0) {
const int8_t cx = get_cell_index_x(RAW_X_POSITION(lx0)), const int8_t cx = get_cell_index_x(RAW_X_POSITION(lx0)),
cy = get_cell_index_y(RAW_Y_POSITION(ly0)); cy = get_cell_index_y(RAW_Y_POSITION(ly0));
@ -268,16 +309,16 @@
} }
const float z1 = calc_z0(RAW_X_POSITION(lx0), const float z1 = calc_z0(RAW_X_POSITION(lx0),
pgm_read_float(&mesh_index_to_xpos[cx]), z_values[cx][cy], mesh_index_to_xpos(cx), z_values[cx][cy],
pgm_read_float(&mesh_index_to_xpos[cx + 1]), z_values[cx + 1][cy]); mesh_index_to_xpos(cx + 1), z_values[cx + 1][cy]);
const float z2 = calc_z0(RAW_X_POSITION(lx0), const float z2 = calc_z0(RAW_X_POSITION(lx0),
pgm_read_float(&mesh_index_to_xpos[cx]), z_values[cx][cy + 1], mesh_index_to_xpos(cx), z_values[cx][cy + 1],
pgm_read_float(&mesh_index_to_xpos[cx + 1]), z_values[cx + 1][cy + 1]); mesh_index_to_xpos(cx + 1), z_values[cx + 1][cy + 1]);
float z0 = calc_z0(RAW_Y_POSITION(ly0), float z0 = calc_z0(RAW_Y_POSITION(ly0),
pgm_read_float(&mesh_index_to_ypos[cy]), z1, mesh_index_to_ypos(cy), z1,
pgm_read_float(&mesh_index_to_ypos[cy + 1]), z2); mesh_index_to_ypos(cy + 1), z2);
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(MESH_ADJUST)) { if (DEBUGGING(MESH_ADJUST)) {
@ -324,10 +365,8 @@
* Returns 0.0 if Z is past the specified 'Fade Height'. * Returns 0.0 if Z is past the specified 'Fade Height'.
*/ */
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
static inline float fade_scaling_factor_for_z(const float &lz) {
FORCE_INLINE float fade_scaling_factor_for_z(const float &lz) {
if (planner.z_fade_height == 0.0) return 1.0; if (planner.z_fade_height == 0.0) return 1.0;
static float fade_scaling_factor = 1.0; static float fade_scaling_factor = 1.0;
const float rz = RAW_Z_POSITION(lz); const float rz = RAW_Z_POSITION(lz);
if (last_specified_z != rz) { if (last_specified_z != rz) {
@ -339,14 +378,25 @@
} }
return fade_scaling_factor; return fade_scaling_factor;
} }
#else
FORCE_INLINE static float fade_scaling_factor_for_z(const float &lz) { return 1.0; }
#endif #endif
FORCE_INLINE static float mesh_index_to_xpos(const uint8_t i) { return pgm_read_float(&_mesh_index_to_xpos[i]); }
FORCE_INLINE static float mesh_index_to_ypos(const uint8_t i) { return pgm_read_float(&_mesh_index_to_ypos[i]); }
static bool prepare_linear_move_to(const float ltarget[XYZE], const float &feedrate);
static void line_to_destination_cartesian(const float &fr, uint8_t e);
}; // class unified_bed_leveling }; // class unified_bed_leveling
extern unified_bed_leveling ubl; extern unified_bed_leveling ubl;
#define UBL_LAST_EEPROM_INDEX E2END #if ENABLED(UBL_G26_MESH_VALIDATION)
FORCE_INLINE void gcode_G26() { ubl.G26(); }
#endif
FORCE_INLINE void gcode_G29() { ubl.G29(); }
#endif // AUTO_BED_LEVELING_UBL #endif // AUTO_BED_LEVELING_UBL
#endif // UNIFIED_BED_LEVELING_H #endif // UNIFIED_BED_LEVELING_H

@ -23,8 +23,6 @@
#include "MarlinConfig.h" #include "MarlinConfig.h"
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
//#include "vector_3.h"
//#include "qr_solve.h"
#include "ubl.h" #include "ubl.h"
#include "Marlin.h" #include "Marlin.h"
@ -32,35 +30,41 @@
#include "configuration_store.h" #include "configuration_store.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "stepper.h" #include "stepper.h"
#include "gcode.h"
#include <math.h> #include <math.h>
#include "least_squares_fit.h" #include "least_squares_fit.h"
extern float destination[XYZE]; #define UBL_G29_P31
extern float current_position[XYZE];
extern float destination[XYZE], current_position[XYZE];
void lcd_return_to_status(); void lcd_return_to_status();
bool lcd_clicked();
void lcd_implementation_clear();
void lcd_mesh_edit_setup(float initial); void lcd_mesh_edit_setup(float initial);
float lcd_mesh_edit(); float lcd_mesh_edit();
void lcd_z_offset_edit_setup(float); void lcd_z_offset_edit_setup(float);
float lcd_z_offset_edit(); float lcd_z_offset_edit();
extern float meshedit_done; extern float meshedit_done;
extern long babysteps_done; extern long babysteps_done;
extern float code_value_float(); extern float probe_pt(const float &x, const float &y, bool, int);
extern uint8_t code_value_byte();
extern bool code_value_bool();
extern bool code_has_value();
extern float probe_pt(float x, float y, bool, int);
extern bool set_probe_deployed(bool); extern bool set_probe_deployed(bool);
void smart_fill_mesh();
bool ProbeStay = true;
#define SIZE_OF_LITTLE_RAISE 0 #define SIZE_OF_LITTLE_RAISE 1
#define BIG_RAISE_NOT_NEEDED 0 #define BIG_RAISE_NOT_NEEDED 0
extern void lcd_quick_feedback();
int unified_bed_leveling::g29_verbose_level,
unified_bed_leveling::g29_phase_value,
unified_bed_leveling::g29_repetition_cnt,
unified_bed_leveling::g29_storage_slot = 0,
unified_bed_leveling::g29_map_type,
unified_bed_leveling::g29_grid_size;
bool unified_bed_leveling::g29_c_flag,
unified_bed_leveling::g29_x_flag,
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;
/** /**
* G29: Unified Bed Leveling by Roxy * G29: Unified Bed Leveling by Roxy
@ -70,18 +74,17 @@
* A Activate Activate the Unified Bed Leveling system. * A Activate Activate the Unified Bed Leveling system.
* *
* B # Business Use the 'Business Card' mode of the Manual Probe subsystem. This is invoked as * B # Business Use the 'Business Card' mode of the Manual Probe subsystem. This is invoked as
* G29 P2 B The mode of G29 P2 allows you to use a bussiness card or recipe card * G29 P2 B. The mode of G29 P2 allows you to use a business card or recipe card
* as a shim that the nozzle will pinch as it is lowered. The idea is that you * as a shim that the nozzle will pinch as it is lowered. The idea is that you
* can easily feel the nozzle getting to the same height by the amount of resistance * can easily feel the nozzle getting to the same height by the amount of resistance
* the business card exhibits to movement. You should try to achieve the same amount * the business card exhibits to movement. You should try to achieve the same amount
* of resistance on each probed point to facilitate accurate and repeatable measurements. * of resistance on each probed point to facilitate accurate and repeatable measurements.
* You should be very careful not to drive the nozzle into the bussiness card with a * You should be very careful not to drive the nozzle into the business card with a
* lot of force as it is very possible to cause damage to your printer if your are * lot of force as it is very possible to cause damage to your printer if your are
* careless. If you use the B option with G29 P2 B you can leave the number parameter off * careless. If you use the B option with G29 P2 B you can omit the numeric value
* on its first use to enable measurement of the business card thickness. Subsequent usage * on first use to measure the business card's thickness. Subsequent usage of 'B'
* of the B parameter can have the number previously measured supplied to the command. * will apply the previously-measured thickness as the default.
* Incidently, you are much better off using something like a Spark Gap feeler gauge than * Note: A non-compressible Spark Gap feeler gauge is recommended over a Business Card.
* something that compresses like a Business Card.
* *
* C Continue Continue, Constant, Current Location. This is not a primary command. C is used to * C Continue Continue, Constant, Current Location. This is not a primary command. C is used to
* further refine the behaviour of several other commands. Issuing a G29 P1 C will * further refine the behaviour of several other commands. Issuing a G29 P1 C will
@ -94,7 +97,7 @@
* *
* E Stow_probe Stow the probe after each sampled point. * E Stow_probe Stow the probe after each sampled point.
* *
* F # Fade * Fade the amount of Mesh Based Compensation over a specified height. At the * F # Fade Fade the amount of Mesh Based Compensation over a specified height. At the
* specified height, no correction is applied and natural printer kenimatics take over. If no * specified height, no correction is applied and natural printer kenimatics take over. If no
* number is specified for the command, 10mm is assumed to be reasonable. * number is specified for the command, 10mm is assumed to be reasonable.
* *
@ -103,34 +106,25 @@
* *
* I # Invalidate Invalidate specified number of Mesh Points. The nozzle location is used unless * I # Invalidate Invalidate specified number of Mesh Points. The nozzle location is used unless
* the X and Y parameter are used. If no number is specified, only the closest Mesh * the X and Y parameter are used. If no number is specified, only the closest Mesh
* point to the location is invalidated. The M parameter is available as well to produce * point to the location is invalidated. The 'T' parameter is also available to produce
* a map after the operation. This command is useful to invalidate a portion of the * a map after the operation. This command is useful to invalidate a portion of the
* Mesh so it can be adjusted using other tools in the Unified Bed Leveling System. When * Mesh so it can be adjusted using other tools in the Unified Bed Leveling System. When
* attempting to invalidate an isolated bad point in the mesh, the M option will indicate * attempting to invalidate an isolated bad point in the mesh, the 'T' option will indicate
* where the nozzle is positioned in the Mesh with (#). You can move the nozzle around on * where the nozzle is positioned in the Mesh with (#). You can move the nozzle around on
* the bed and use this feature to select the center of the area (or cell) you want to * the bed and use this feature to select the center of the area (or cell) you want to
* invalidate. * invalidate.
* *
* J # Grid * Perform a Grid Based Leveling of the current Mesh using a grid with n points on a side. * J # Grid Perform a Grid Based Leveling of the current Mesh using a grid with n points on a side.
* * Not specifying a grid size will invoke the 3-Point leveling function.
* j EEPROM Dump This function probably goes away after debug is complete.
* *
* K # Kompare Kompare current Mesh with stored Mesh # replacing current Mesh with the result. This * K # Kompare Kompare current Mesh with stored Mesh # replacing current Mesh with the result. This
* command literally performs a diff between two Meshes. * command literally performs a diff between two Meshes.
* *
* L Load * Load Mesh from the previously activated location in the EEPROM. * L Load Load Mesh from the previously activated location in the EEPROM.
* *
* L # Load * Load Mesh from the specified location in the EEPROM. Set this location as activated * L # Load Load Mesh from the specified location in the EEPROM. Set this location as activated
* for subsequent Load and Store operations. * for subsequent Load and Store operations.
* *
* O Map * Display the Mesh Map Topology.
* The parameter can be specified alone (ie. G29 O) or in combination with many of the
* other commands. The Mesh Map option works with all of the Phase
* commands (ie. G29 P4 R 5 X 50 Y100 C -.1 O) The Map parameter can also of a Map Type
* specified. A map type of 0 is the default is user readable. A map type of 1 can
* be specified and is suitable to Cut & Paste into Excel to allow graphing of the user's
* mesh.
*
* The P or Phase commands are used for the bulk of the work to setup a Mesh. In general, your Mesh will * The P or Phase commands are used for the bulk of the work to setup a Mesh. In general, your Mesh will
* start off being initialized with a G29 P0 or a G29 P1. Further refinement of the Mesh happens with * start off being initialized with a G29 P0 or a G29 P1. Further refinement of the Mesh happens with
* each additional Phase that processes it. * each additional Phase that processes it.
@ -141,19 +135,21 @@
* a subsequent G or T leveling operation for backward compatibility. * a subsequent G or T leveling operation for backward compatibility.
* *
* P1 Phase 1 Invalidate entire Mesh and continue with automatic generation of the Mesh data using * P1 Phase 1 Invalidate entire Mesh and continue with automatic generation of the Mesh data using
* the Z-Probe. Depending upon the values of DELTA_PROBEABLE_RADIUS and * the Z-Probe. Usually the probe can't reach all areas that the nozzle can reach. On
* DELTA_PRINTABLE_RADIUS some area of the bed will not have Mesh Data automatically * Cartesian printers, points within the X_PROBE_OFFSET_FROM_EXTRUDER and Y_PROBE_OFFSET_FROM_EXTRUDER
* generated. This will be handled in Phase 2. If the Phase 1 command is given the * area cannot be automatically probed. For Delta printers the area in which DELTA_PROBEABLE_RADIUS
* and DELTA_PRINTABLE_RADIUS do not overlap will not be automatically probed.
*
* These points will be handled in Phase 2 and Phase 3. If the Phase 1 command is given the
* C (Continue) parameter it does not invalidate the Mesh prior to automatically * C (Continue) parameter it does not invalidate the Mesh prior to automatically
* probing needed locations. This allows you to invalidate portions of the Mesh but still * probing needed locations. This allows you to invalidate portions of the Mesh but still
* use the automatic probing capabilities of the Unified Bed Leveling System. An X and Y * use the automatic probing capabilities of the Unified Bed Leveling System. An X and Y
* parameter can be given to prioritize where the command should be trying to measure points. * parameter can be given to prioritize where the command should be trying to measure points.
* If the X and Y parameters are not specified the current probe position is used. Phase 1 * If the X and Y parameters are not specified the current probe position is used.
* allows you to specify the M (Map) parameter so you can watch the generation of the Mesh. * P1 accepts a 'T' (Topology) parameter so you can observe mesh generation.
* Phase 1 also watches for the LCD Panel's Encoder Switch being held in a depressed state. * P1 also watches for the LCD Panel Encoder Switch to be held down, and will suspend
* It will suspend generation of the Mesh if it sees the user request that. (This check is * generation of the Mesh in that case. (Note: This check is only done between probe points,
* only done between probe points. You will need to press and hold the switch until the * so you must press and hold the switch until the Phase 1 command detects it.)
* Phase 1 command can detect it.)
* *
* P2 Phase 2 Probe areas of the Mesh that can't be automatically handled. Phase 2 respects an H * P2 Phase 2 Probe areas of the Mesh that can't be automatically handled. Phase 2 respects an H
* parameter to control the height between Mesh points. The default height for movement * parameter to control the height between Mesh points. The default height for movement
@ -170,13 +166,13 @@
* area you are manually probing. Note that the command tries to start you in a corner * area you are manually probing. Note that the command tries to start you in a corner
* of the bed where movement will be predictable. You can force the location to be used in * of the bed where movement will be predictable. You can force the location to be used in
* the distance calculations by using the X and Y parameters. You may find it is helpful to * the distance calculations by using the X and Y parameters. You may find it is helpful to
* print out a Mesh Map (G29 O) to understand where the mesh is invalidated and where * print out a Mesh Map (G29 T) to understand where the mesh is invalidated and where
* the nozzle will need to move in order to complete the command. The C parameter is * the nozzle will need to move in order to complete the command. The C parameter is
* available on the Phase 2 command also and indicates the search for points to measure should * available on the Phase 2 command also and indicates the search for points to measure should
* be done based on the current location of the nozzle. * be done based on the current location of the nozzle.
* *
* A B parameter is also available for this command and described up above. It places the * A B parameter is also available for this command and described up above. It places the
* manual probe subsystem into Business Card mode where the thickness of a business care is * manual probe subsystem into Business Card mode where the thickness of a business card is
* measured and then used to accurately set the nozzle height in all manual probing for the * measured and then used to accurately set the nozzle height in all manual probing for the
* duration of the command. (S for Shim mode would be a better parameter name, but S is needed * duration of the command. (S for Shim mode would be a better parameter name, but S is needed
* for Save or Store of the Mesh to EEPROM) A Business card can be used, but you will have * for Save or Store of the Mesh to EEPROM) A Business card can be used, but you will have
@ -186,7 +182,7 @@
* to get it to grasp the shim with the same force as when you measured the thickness of the * to get it to grasp the shim with the same force as when you measured the thickness of the
* shim at the start of the command. * shim at the start of the command.
* *
* Phase 2 allows the O (Map) parameter to be specified. This helps the user see the progression * Phase 2 allows the T (Map) parameter to be specified. This helps the user see the progression
* of the Mesh being built. * of the Mesh being built.
* *
* P3 Phase 3 Fill the unpopulated regions of the Mesh with a fixed value. There are two different paths the * P3 Phase 3 Fill the unpopulated regions of the Mesh with a fixed value. There are two different paths the
@ -205,7 +201,7 @@
* Mesh Validation Pattern phase. Please note that you are populating your mesh with unverified * Mesh Validation Pattern phase. Please note that you are populating your mesh with unverified
* numbers. You should use some scrutiny and caution. * numbers. You should use some scrutiny and caution.
* *
* P4 Phase 4 Fine tune the Mesh. The Delta Mesh Compensation System assume the existance of * P4 Phase 4 Fine tune the Mesh. The Delta Mesh Compensation System assume the existence of
* an LCD Panel. It is possible to fine tune the mesh without the use of an LCD Panel. * an LCD Panel. It is possible to fine tune the mesh without the use of an LCD Panel.
* (More work and details on doing this later!) * (More work and details on doing this later!)
* The System will search for the closest Mesh Point to the nozzle. It will move the * The System will search for the closest Mesh Point to the nozzle. It will move the
@ -242,7 +238,7 @@
* you should have the Mesh adjusted for a Mean Height of 0.00 and the Z-Probe measuring * you should have the Mesh adjusted for a Mean Height of 0.00 and the Z-Probe measuring
* 0.000 at the Z Home location. * 0.000 at the Z Home location.
* *
* Q Test * Load specified Test Pattern to assist in checking correct operation of system. This * Q Test Load specified Test Pattern to assist in checking correct operation of system. This
* command is not anticipated to be of much value to the typical user. It is intended * command is not anticipated to be of much value to the typical user. It is intended
* for developers to help them verify correct operation of the Unified Bed Leveling System. * for developers to help them verify correct operation of the Unified Bed Leveling System.
* *
@ -260,23 +256,23 @@
* at a later date. The GCode output can be saved and later replayed by the host software * 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. * to reconstruct the current mesh on another machine.
* *
* T 3-Point Perform a 3 Point Bed Leveling on the current Mesh * 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.
* This option works with all Phase commands (e.g., G29 P4 R 5 T X 50 Y100 C -.1 O)
* This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 can
* is suitable to paste into a spreadsheet for a 3D graph of the mesh.
* *
* U Unlevel Perform a probe of the outer perimeter to assist in physically leveling unlevel beds. * U Unlevel Perform a probe of the outer perimeter to assist in physically leveling unlevel beds.
* Only used for G29 P1 O U It will speed up the probing of the edge of the bed. This * Only used for G29 P1 T U. This speeds up the probing of the edge of the bed. Useful
* is useful when the entire bed does not need to be probed because it will be adjusted. * when the entire bed doesn't need to be probed because it will be adjusted.
*
* W What? Display valuable data the Unified Bed Leveling System knows.
* *
* X # * * X Location for this line of commands * V # Verbosity Set the verbosity level (0-4) for extra details. (Default 0)
* *
* Y # * * Y Location for this line of commands * W What? Display valuable Unified Bed Leveling System data.
* *
* Z Zero * Probes to set the Z Height of the nozzle. The entire Mesh can be raised or lowered * X # X Location for this command
* by just doing a G29 Z
* *
* Z # Zero * The entire Mesh can be raised or lowered to conform with the specified difference. * Y # Y Location for this command
* zprobe_zoffset is added to the calculation.
* *
* *
* Release Notes: * Release Notes:
@ -307,127 +303,151 @@
* we now have the functionality and features of all three systems combined. * we now have the functionality and features of all three systems combined.
*/ */
#define USE_NOZZLE_AS_REFERENCE 0 void unified_bed_leveling::G29() {
#define USE_PROBE_AS_REFERENCE 1
// The simple parameter flags and values are 'static' so parameter parsing can be in a support routine. if (!settings.calc_num_meshes()) {
static int g29_verbose_level, phase_value, repetition_cnt,
storage_slot = 0, map_type, grid_size;
static bool repeat_flag, c_flag, x_flag, y_flag;
static float x_pos, y_pos, measured_z, card_thickness = 0.0, ubl_constant = 0.0;
extern void lcd_setstatus(const char* message, const bool persist);
extern void lcd_setstatuspgm(const char* message, const uint8_t level);
void __attribute__((optimize("O0"))) gcode_G29() {
if (ubl.eeprom_start < 0) {
SERIAL_PROTOCOLLNPGM("?You need to enable your EEPROM and initialize it"); SERIAL_PROTOCOLLNPGM("?You need to enable your EEPROM and initialize it");
SERIAL_PROTOCOLLNPGM("with M502, M500, M501 in that order.\n"); SERIAL_PROTOCOLLNPGM("with M502, M500, M501 in that order.\n");
return; return;
} }
if (!code_seen('N') && axis_unhomed_error(true, true, true)) // Don't allow auto-leveling without homing first // Check for commands that require the printer to be homed
if (axis_unhomed_error()) {
const int8_t p_val = parser.seen('P') && parser.has_value() ? parser.value_int() : -1;
if (p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'))
home_all_axes(); home_all_axes();
}
if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem, if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
// Invalidate Mesh Points. This command is a little bit asymetrical because // Invalidate Mesh Points. This command is a little bit asymmetrical because
// it directly specifies the repetition count and does not use the 'R' parameter. // it directly specifies the repetition count and does not use the 'R' parameter.
if (code_seen('I')) { if (parser.seen('I')) {
uint8_t cnt = 0; uint8_t cnt = 0;
repetition_cnt = code_has_value() ? code_value_int() : 1; g29_repetition_cnt = parser.has_value() ? parser.value_int() : 1;
while (repetition_cnt--) { while (g29_repetition_cnt--) {
if (cnt > 20) { cnt = 0; idle(); } if (cnt > 20) { cnt = 0; idle(); }
const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, x_pos, y_pos, USE_NOZZLE_AS_REFERENCE, NULL, false); const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, NULL, false);
if (location.x_index < 0) { if (location.x_index < 0) {
SERIAL_PROTOCOLLNPGM("Entire Mesh invalidated.\n"); SERIAL_PROTOCOLLNPGM("Entire Mesh invalidated.\n");
break; // No more invalid Mesh Points to populate break; // No more invalid Mesh Points to populate
} }
ubl.z_values[location.x_index][location.y_index] = NAN; z_values[location.x_index][location.y_index] = NAN;
cnt++; cnt++;
} }
SERIAL_PROTOCOLLNPGM("Locations invalidated.\n"); SERIAL_PROTOCOLLNPGM("Locations invalidated.\n");
} }
if (code_seen('Q')) { if (parser.seen('Q')) {
const int test_pattern = code_has_value() ? code_value_int() : -1; const int test_pattern = parser.has_value() ? parser.value_int() : -99;
if (!WITHIN(test_pattern, 0, 2)) { if (!WITHIN(test_pattern, -1, 2)) {
SERIAL_PROTOCOLLNPGM("Invalid test_pattern value. (0-2)\n"); SERIAL_PROTOCOLLNPGM("Invalid test_pattern value. (-1 to 2)\n");
return; return;
} }
SERIAL_PROTOCOLLNPGM("Loading test_pattern values.\n"); SERIAL_PROTOCOLLNPGM("Loading test_pattern values.\n");
switch (test_pattern) { switch (test_pattern) {
case -1:
g29_eeprom_dump();
break;
case 0: case 0:
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) { // Create a bowl shape - similar to 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. 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, const float p1 = 0.5 * (GRID_MAX_POINTS_X) - x,
p2 = 0.5 * (GRID_MAX_POINTS_Y) - y; p2 = 0.5 * (GRID_MAX_POINTS_Y) - y;
ubl.z_values[x][y] += 2.0 * HYPOT(p1, p2); z_values[x][y] += 2.0 * HYPOT(p1, p2);
} }
} }
break; break;
case 1: case 1:
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) { // Create a diagonal line several Mesh cells thick that is raised for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) { // Create a diagonal line several Mesh cells thick that is raised
ubl.z_values[x][x] += 9.999; z_values[x][x] += 9.999;
ubl.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 + (x < GRID_MAX_POINTS_Y - 1) ? 1 : -1] += 9.999; // We want the altered line several mesh points thick
} }
break; break;
case 2: case 2:
// Allow the user to specify the height because 10mm is a little extreme in some cases. // 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 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 for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) // the center of the bed
ubl.z_values[x][y] += code_seen('C') ? ubl_constant : 9.99; z_values[x][y] += parser.seen('C') ? g29_constant : 9.99;
break; break;
} }
} }
if (code_seen('J')) { if (parser.seen('J')) {
ubl.save_ubl_active_state_and_disable(); if (g29_grid_size) { // if not 0 it is a normal n x n grid being probed
ubl.tilt_mesh_based_on_probed_grid(code_seen('O') || code_seen('M')); save_ubl_active_state_and_disable();
ubl.restore_ubl_active_state_and_leave(); tilt_mesh_based_on_probed_grid(parser.seen('T'));
restore_ubl_active_state_and_leave();
}
else { // grid_size == 0 : A 3-Point leveling has been requested
float z3, z2, z1 = probe_pt(LOGICAL_X_POSITION(UBL_PROBE_PT_1_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_1_Y), false, g29_verbose_level);
if (!isnan(z1)) {
z2 = probe_pt(LOGICAL_X_POSITION(UBL_PROBE_PT_2_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_2_Y), false, g29_verbose_level);
if (!isnan(z2))
z3 = probe_pt(LOGICAL_X_POSITION(UBL_PROBE_PT_3_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_3_Y), true, g29_verbose_level);
}
if (isnan(z1) || isnan(z2) || isnan(z3)) { // probe_pt will return NAN if unreachable
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Attempt to probe off the bed.");
goto LEAVE;
} }
if (code_seen('P')) { // Adjust z1, z2, z3 by the Mesh Height at these points. Just because they're non-zero
if (WITHIN(phase_value, 0, 1) && ubl.state.eeprom_storage_slot == -1) { // doesn't mean the Mesh is tilted! (Compensate each probe point by what the Mesh says
ubl.state.eeprom_storage_slot = 0; // its height is.)
SERIAL_PROTOCOLLNPGM("Default storage slot 0 selected.\n");
save_ubl_active_state_and_disable();
z1 -= get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_1_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_1_Y)) /* + zprobe_zoffset */ ;
z2 -= get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_2_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_2_Y)) /* + zprobe_zoffset */ ;
z3 -= get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_3_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_3_Y)) /* + zprobe_zoffset */ ;
do_blocking_move_to_xy(0.5 * (UBL_MESH_MAX_X - (UBL_MESH_MIN_X)), 0.5 * (UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y)));
tilt_mesh_based_on_3pts(z1, z2, z3);
restore_ubl_active_state_and_leave();
}
} }
switch (phase_value) { if (parser.seen('P')) {
if (WITHIN(g29_phase_value, 0, 1) && state.storage_slot == -1) {
state.storage_slot = 0;
SERIAL_PROTOCOLLNPGM("Default storage slot 0 selected.");
}
switch (g29_phase_value) {
case 0: case 0:
// //
// Zero Mesh Data // Zero Mesh Data
// //
ubl.reset(); reset();
SERIAL_PROTOCOLLNPGM("Mesh zeroed.\n"); SERIAL_PROTOCOLLNPGM("Mesh zeroed.");
break; break;
case 1: case 1:
// //
// Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
// //
if (!code_seen('C')) { if (!parser.seen('C')) {
ubl.invalidate(); invalidate();
SERIAL_PROTOCOLLNPGM("Mesh invalidated. Probing mesh.\n"); SERIAL_PROTOCOLLNPGM("Mesh invalidated. Probing mesh.");
} }
if (g29_verbose_level > 1) { if (g29_verbose_level > 1) {
SERIAL_PROTOCOLPAIR("Probing Mesh Points Closest to (", x_pos); SERIAL_PROTOCOLPAIR("Probing Mesh Points Closest to (", g29_x_pos);
SERIAL_PROTOCOLCHAR(','); SERIAL_PROTOCOLCHAR(',');
SERIAL_PROTOCOL(y_pos); SERIAL_PROTOCOL(g29_y_pos);
SERIAL_PROTOCOLLNPGM(").\n"); SERIAL_PROTOCOLLNPGM(").\n");
} }
ubl.probe_entire_mesh(x_pos + X_PROBE_OFFSET_FROM_EXTRUDER, y_pos + Y_PROBE_OFFSET_FROM_EXTRUDER, probe_entire_mesh(g29_x_pos + X_PROBE_OFFSET_FROM_EXTRUDER, g29_y_pos + Y_PROBE_OFFSET_FROM_EXTRUDER,
code_seen('O') || code_seen('M'), code_seen('E'), code_seen('U')); parser.seen('T'), parser.seen('E'), parser.seen('U'));
break; break;
case 2: { case 2: {
// //
// Manually Probe Mesh in areas that can't be reached by the probe // Manually Probe Mesh in areas that can't be reached by the probe
// //
SERIAL_PROTOCOLLNPGM("Manually probing unreachable mesh locations.\n"); SERIAL_PROTOCOLLNPGM("Manually probing unreachable mesh locations.");
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
if (!x_flag && !y_flag) { if (!g29_x_flag && !g29_y_flag) {
/** /**
* Use a good default location for the path. * Use a good default location for the path.
* The flipped > and < operators in these comparisons is intentional. * The flipped > and < operators in these comparisons is intentional.
@ -435,28 +455,39 @@
* It may make sense to have Delta printers default to the center of the bed. * It may make sense to have Delta printers default to the center of the bed.
* Until that is decided, this can be forced with the X and Y parameters. * Until that is decided, this can be forced with the X and Y parameters.
*/ */
x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? UBL_MESH_MAX_X : UBL_MESH_MIN_X; #if IS_KINEMATIC
y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? UBL_MESH_MAX_Y : UBL_MESH_MIN_Y; g29_x_pos = X_HOME_POS;
g29_y_pos = Y_HOME_POS;
#else // cartesian
g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_MAX_POS : X_MIN_POS;
g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_MAX_POS : Y_MIN_POS;
#endif
} }
if (code_seen('C')) { if (parser.seen('C')) {
x_pos = current_position[X_AXIS]; g29_x_pos = current_position[X_AXIS];
y_pos = current_position[Y_AXIS]; g29_y_pos = current_position[Y_AXIS];
} }
const float height = code_seen('H') && code_has_value() ? code_value_float() : Z_CLEARANCE_BETWEEN_PROBES; float height = Z_CLEARANCE_BETWEEN_PROBES;
if (code_seen('B')) { if (parser.seen('B')) {
card_thickness = code_has_value() ? code_value_float() : measure_business_card_thickness(height); g29_card_thickness = parser.has_value() ? parser.value_float() : measure_business_card_thickness(height);
if (fabs(g29_card_thickness) > 1.5) {
if (fabs(card_thickness) > 1.5) { SERIAL_PROTOCOLLNPGM("?Error in Business Card measurement.");
SERIAL_PROTOCOLLNPGM("?Error in Business Card measurement.\n");
return; return;
} }
} }
manually_probe_remaining_mesh(x_pos, y_pos, height, card_thickness, code_seen('O') || code_seen('M'));
SERIAL_PROTOCOLLNPGM("G29 P2 finished.");
if (parser.seen('H') && parser.has_value()) height = parser.value_float();
if (!position_is_reachable_xy(g29_x_pos, g29_y_pos)) {
SERIAL_PROTOCOLLNPGM("XY outside printable radius.");
return;
}
manually_probe_remaining_mesh(g29_x_pos, g29_y_pos, height, g29_card_thickness, parser.seen('T'));
SERIAL_PROTOCOLLNPGM("G29 P2 finished.");
} break; } break;
case 3: { case 3: {
@ -466,142 +497,164 @@
* - Specify a constant with the 'C' parameter. * - Specify a constant with the 'C' parameter.
* - Allow 'G29 P3' to choose a 'reasonable' constant. * - Allow 'G29 P3' to choose a 'reasonable' constant.
*/ */
if (c_flag) { if (g29_c_flag) {
while (repetition_cnt--) { if (g29_repetition_cnt >= GRID_MAX_POINTS) {
const mesh_index_pair location = find_closest_mesh_point_of_type(INVALID, x_pos, y_pos, USE_NOZZLE_AS_REFERENCE, NULL, false); for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {
if (location.x_index < 0) break; // No more invalid Mesh Points to populate for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
ubl.z_values[location.x_index][location.y_index] = ubl_constant; z_values[x][y] = g29_constant;
} }
break;
} }
else }
smart_fill_mesh(); // Do a 'Smart' fill using nearby known values else {
while (g29_repetition_cnt--) { // this only populates reachable mesh points near
const mesh_index_pair location = find_closest_mesh_point_of_type(INVALID, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, NULL, false);
if (location.x_index < 0) break; // No more reachable invalid Mesh Points to populate
z_values[location.x_index][location.y_index] = g29_constant;
}
}
} else {
const float cvf = parser.value_float();
switch((int)truncf(cvf * 10.0) - 30) { // 3.1 -> 1
#if ENABLED(UBL_G29_P31)
case 1: {
} break; // P3.1 use least squares fit to fill missing mesh values
// P3.10 zero weighting for distance, all grid points equal, best fit tilted plane
// P3.11 10X weighting for nearest grid points versus farthest grid points
// 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;
smart_fill_wlsf(weight_factor);
}
break;
#endif
case 0: // P3 or P3.0
default: // and anything P3.x that's not P3.1
smart_fill_mesh(); // Do a 'Smart' fill using nearby known values
break;
}
}
break;
}
case 4: case 4:
// //
// Fine Tune (i.e., Edit) the Mesh // Fine Tune (i.e., Edit) the Mesh
// //
fine_tune_mesh(x_pos, y_pos, code_seen('O') || code_seen('M')); fine_tune_mesh(g29_x_pos, g29_y_pos, parser.seen('T'));
break; break;
case 5: ubl.find_mean_mesh_height(); break; case 5: find_mean_mesh_height(); break;
case 6: ubl.shift_mesh_height(); break; case 6: shift_mesh_height(); break;
} }
}
if (code_seen('T')) {
float z1 = probe_pt(LOGICAL_X_POSITION(UBL_PROBE_PT_1_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_1_Y), false, g29_verbose_level),
z2 = probe_pt(LOGICAL_X_POSITION(UBL_PROBE_PT_2_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_2_Y), false, g29_verbose_level),
z3 = probe_pt(LOGICAL_X_POSITION(UBL_PROBE_PT_3_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_3_Y), true, g29_verbose_level);
// We need to adjust z1, z2, z3 by the Mesh Height at these points. Just because they are non-zero doesn't mean
// the Mesh is tilted! (We need to compensate each probe point by what the Mesh says that location's height is)
ubl.save_ubl_active_state_and_disable();
z1 -= ubl.get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_1_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_1_Y)) /* + zprobe_zoffset */ ;
z2 -= ubl.get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_2_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_2_Y)) /* + zprobe_zoffset */ ;
z3 -= ubl.get_z_correction(LOGICAL_X_POSITION(UBL_PROBE_PT_3_X), LOGICAL_Y_POSITION(UBL_PROBE_PT_3_Y)) /* + zprobe_zoffset */ ;
do_blocking_move_to_xy(0.5 * (UBL_MESH_MAX_X - (UBL_MESH_MIN_X)), 0.5 * (UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y)));
ubl.tilt_mesh_based_on_3pts(z1, z2, z3);
ubl.restore_ubl_active_state_and_leave();
} }
// //
// Much of the 'What?' command can be eliminated. But until we are fully debugged, it is // Much of the 'What?' command can be eliminated. But until we are fully debugged, it is
// good to have the extra information. Soon... we prune this to just a few items // good to have the extra information. Soon... we prune this to just a few items
// //
if (code_seen('W')) g29_what_command(); if (parser.seen('W')) g29_what_command();
//
// When we are fully debugged, the EEPROM dump command will get deleted also. But
// right now, it is good to have the extra information. Soon... we prune this.
//
if (code_seen('j')) g29_eeprom_dump(); // EEPROM Dump
// //
// When we are fully debugged, this may go away. But there are some valid // When we are fully debugged, this may go away. But there are some valid
// use cases for the users. So we can wait and see what to do with it. // use cases for the users. So we can wait and see what to do with it.
// //
if (code_seen('K')) // Kompare Current Mesh Data to Specified Stored Mesh if (parser.seen('K')) // Kompare Current Mesh Data to Specified Stored Mesh
g29_compare_current_mesh_to_stored_mesh(); g29_compare_current_mesh_to_stored_mesh();
// //
// Load a Mesh from the EEPROM // Load a Mesh from the EEPROM
// //
if (code_seen('L')) { // Load Current Mesh Data if (parser.seen('L')) { // Load Current Mesh Data
storage_slot = code_has_value() ? code_value_int() : ubl.state.eeprom_storage_slot; g29_storage_slot = parser.has_value() ? parser.value_int() : state.storage_slot;
int16_t a = settings.calc_num_meshes();
const int16_t j = (UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(ubl.z_values); if (!a) {
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
return;
}
if (!WITHIN(storage_slot, 0, j - 1) || ubl.eeprom_start <= 0) { if (!WITHIN(g29_storage_slot, 0, a - 1)) {
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available for use.\n"); SERIAL_PROTOCOLLNPGM("?Invalid storage slot.");
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", a - 1);
return; return;
} }
ubl.load_mesh(storage_slot);
ubl.state.eeprom_storage_slot = storage_slot; settings.load_mesh(g29_storage_slot);
SERIAL_PROTOCOLLNPGM("Done.\n"); state.storage_slot = g29_storage_slot;
SERIAL_PROTOCOLLNPGM("Done.");
} }
// //
// Store a Mesh in the EEPROM // Store a Mesh in the EEPROM
// //
if (code_seen('S')) { // Store (or Save) Current Mesh Data if (parser.seen('S')) { // Store (or Save) Current Mesh Data
storage_slot = code_has_value() ? code_value_int() : ubl.state.eeprom_storage_slot; g29_storage_slot = parser.has_value() ? parser.value_int() : state.storage_slot;
if (storage_slot == -1) { // Special case, we are going to 'Export' the mesh to the if (g29_storage_slot == -1) { // Special case, we are going to 'Export' the mesh to the
SERIAL_ECHOLNPGM("G29 I 999"); // host in a form it can be reconstructed on a different machine SERIAL_ECHOLNPGM("G29 I 999"); // host in a form it can be reconstructed on a different machine
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(ubl.z_values[x][y])) { if (!isnan(z_values[x][y])) {
SERIAL_ECHOPAIR("M421 I ", x); SERIAL_ECHOPAIR("M421 I ", x);
SERIAL_ECHOPAIR(" J ", y); SERIAL_ECHOPAIR(" J ", y);
SERIAL_ECHOPGM(" Z "); SERIAL_ECHOPGM(" Z ");
SERIAL_ECHO_F(ubl.z_values[x][y], 6); SERIAL_ECHO_F(z_values[x][y], 6);
SERIAL_ECHOPAIR(" ; X ", LOGICAL_X_POSITION(pgm_read_float(&ubl.mesh_index_to_xpos[x]))); SERIAL_ECHOPAIR(" ; X ", LOGICAL_X_POSITION(mesh_index_to_xpos(x)));
SERIAL_ECHOPAIR(", Y ", LOGICAL_Y_POSITION(pgm_read_float(&ubl.mesh_index_to_ypos[y]))); SERIAL_ECHOPAIR(", Y ", LOGICAL_Y_POSITION(mesh_index_to_ypos(y)));
SERIAL_EOL; SERIAL_EOL;
} }
return; return;
} }
const int16_t j = (UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(ubl.z_values); int16_t a = settings.calc_num_meshes();
if (!WITHIN(storage_slot, 0, j - 1) || ubl.eeprom_start <= 0) { if (!a) {
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available for use.\n"); SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", j - 1);
goto LEAVE; goto LEAVE;
} }
ubl.store_mesh(storage_slot);
ubl.state.eeprom_storage_slot = storage_slot;
SERIAL_PROTOCOLLNPGM("Done.\n"); if (!WITHIN(g29_storage_slot, 0, a - 1)) {
SERIAL_PROTOCOLLNPGM("?Invalid storage slot.");
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", a - 1);
goto LEAVE;
} }
if (code_seen('O') || code_seen('M')) settings.store_mesh(g29_storage_slot);
ubl.display_map(code_has_value() ? code_value_int() : 0); state.storage_slot = g29_storage_slot;
SERIAL_PROTOCOLLNPGM("Done.");
}
if (code_seen('Z')) { if (parser.seen('T'))
if (code_has_value()) display_map(parser.has_value() ? parser.value_int() : 0);
ubl.state.z_offset = code_value_float(); // do the simple case. Just lock in the specified value
/**
* This code may not be needed... Prepare for its removal...
*
*/
#if 0
if (parser.seen('Z')) {
if (parser.has_value())
state.z_offset = parser.value_float(); // do the simple case. Just lock in the specified value
else { else {
ubl.save_ubl_active_state_and_disable(); save_ubl_active_state_and_disable();
//measured_z = probe_pt(x_pos + X_PROBE_OFFSET_FROM_EXTRUDER, y_pos + Y_PROBE_OFFSET_FROM_EXTRUDER, ProbeDeployAndStow, g29_verbose_level); //float measured_z = probe_pt(g29_x_pos + X_PROBE_OFFSET_FROM_EXTRUDER, g29_y_pos + Y_PROBE_OFFSET_FROM_EXTRUDER, ProbeDeployAndStow, g29_verbose_level);
ubl.has_control_of_lcd_panel = true; // Grab the LCD Hardware has_control_of_lcd_panel = true; // Grab the LCD Hardware
measured_z = 1.5; float measured_z = 1.5;
do_blocking_move_to_z(measured_z); // Get close to the bed, but leave some space so we don't damage anything do_blocking_move_to_z(measured_z); // Get close to the bed, but leave some space so we don't damage anything
// The user is not going to be locking in a new Z-Offset very often so // The user is not going to be locking in a new Z-Offset very often so
// it won't be that painful to spin the Encoder Wheel for 1.5mm // it won't be that painful to spin the Encoder Wheel for 1.5mm
lcd_implementation_clear(); lcd_refresh();
lcd_z_offset_edit_setup(measured_z); lcd_z_offset_edit_setup(measured_z);
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
@ -612,9 +665,9 @@
do_blocking_move_to_z(measured_z); do_blocking_move_to_z(measured_z);
} while (!ubl_lcd_clicked()); } while (!ubl_lcd_clicked());
ubl.has_control_of_lcd_panel = true; // There is a race condition for the Encoder Wheel getting clicked. has_control_of_lcd_panel = true; // There is a race condition for the encoder click.
// It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune) // It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune)
// or here. So, until we are done looking for a long Encoder Wheel Press, // or here. So, until we are done looking for a long encoder press,
// we need to take control of the panel // we need to take control of the panel
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
@ -627,20 +680,21 @@
if (ELAPSED(millis(), nxt)) { if (ELAPSED(millis(), nxt)) {
SERIAL_PROTOCOLLNPGM("\nZ-Offset Adjustment Stopped."); SERIAL_PROTOCOLLNPGM("\nZ-Offset Adjustment Stopped.");
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
LCD_MESSAGEPGM("Z-Offset Stopped"); LCD_MESSAGEPGM("Z-Offset Stopped"); // TODO: Make translatable string
ubl.restore_ubl_active_state_and_leave(); restore_ubl_active_state_and_leave();
goto LEAVE; goto LEAVE;
} }
} }
ubl.has_control_of_lcd_panel = false; has_control_of_lcd_panel = false;
safe_delay(20); // We don't want any switch noise. safe_delay(20); // We don't want any switch noise.
ubl.state.z_offset = measured_z; state.z_offset = measured_z;
lcd_implementation_clear(); lcd_refresh();
ubl.restore_ubl_active_state_and_leave(); restore_ubl_active_state_and_leave();
} }
} }
#endif
LEAVE: LEAVE:
@ -648,7 +702,7 @@
LCD_MESSAGEPGM(""); LCD_MESSAGEPGM("");
lcd_quick_feedback(); lcd_quick_feedback();
ubl.has_control_of_lcd_panel = false; has_control_of_lcd_panel = false;
} }
void unified_bed_leveling::find_mean_mesh_height() { void unified_bed_leveling::find_mean_mesh_height() {
@ -656,21 +710,21 @@
int n = 0; int n = 0;
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(ubl.z_values[x][y])) { if (!isnan(z_values[x][y])) {
sum += ubl.z_values[x][y]; sum += z_values[x][y];
n++; n++;
} }
const float mean = sum / n; const float mean = sum / n;
// //
// Now do the sumation of the squares of difference from mean // Sum the squares of difference from mean
// //
float sum_of_diff_squared = 0.0; float sum_of_diff_squared = 0.0;
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(ubl.z_values[x][y])) if (!isnan(z_values[x][y]))
sum_of_diff_squared += sq(ubl.z_values[x][y] - mean); sum_of_diff_squared += sq(z_values[x][y] - mean);
SERIAL_ECHOLNPAIR("# of samples: ", n); SERIAL_ECHOLNPAIR("# of samples: ", n);
SERIAL_ECHOPGM("Mean Mesh Height: "); SERIAL_ECHOPGM("Mean Mesh Height: ");
@ -682,68 +736,61 @@
SERIAL_ECHO_F(sigma, 6); SERIAL_ECHO_F(sigma, 6);
SERIAL_EOL; SERIAL_EOL;
if (c_flag) if (g29_c_flag)
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(ubl.z_values[x][y])) if (!isnan(z_values[x][y]))
ubl.z_values[x][y] -= mean + ubl_constant; z_values[x][y] -= mean + g29_constant;
} }
void unified_bed_leveling::shift_mesh_height() { void unified_bed_leveling::shift_mesh_height() {
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(ubl.z_values[x][y])) if (!isnan(z_values[x][y]))
ubl.z_values[x][y] += ubl_constant; z_values[x][y] += g29_constant;
} }
/** /**
* Probe all invalidated locations of the mesh that can be reached by the probe. * Probe all invalidated locations of the mesh that can be reached by the probe.
* This attempts to fill in locations closest to the nozzle's start location first. * This attempts to fill in locations closest to the nozzle's start location first.
*/ */
void unified_bed_leveling::probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest) { void unified_bed_leveling::probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool close_or_far) {
mesh_index_pair location; mesh_index_pair location;
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
ubl.save_ubl_active_state_and_disable(); // we don't do bed level correction because we want the raw data when we probe save_ubl_active_state_and_disable(); // we don't do bed level correction because we want the raw data when we probe
DEPLOY_PROBE(); DEPLOY_PROBE();
uint16_t max_iterations = GRID_MAX_POINTS;
do { do {
if (ubl_lcd_clicked()) { if (ubl_lcd_clicked()) {
SERIAL_PROTOCOLLNPGM("\nMesh only partially populated.\n"); SERIAL_PROTOCOLLNPGM("\nMesh only partially populated.\n");
lcd_quick_feedback(); lcd_quick_feedback();
STOW_PROBE(); STOW_PROBE();
while (ubl_lcd_clicked()) idle(); while (ubl_lcd_clicked()) idle();
ubl.has_control_of_lcd_panel = false; has_control_of_lcd_panel = false;
ubl.restore_ubl_active_state_and_leave(); restore_ubl_active_state_and_leave();
safe_delay(50); // Debounce the Encoder wheel safe_delay(50); // Debounce the Encoder wheel
return; return;
} }
location = find_closest_mesh_point_of_type(INVALID, lx, ly, USE_PROBE_AS_REFERENCE, NULL, do_furthest); location = find_closest_mesh_point_of_type(INVALID, lx, ly, USE_PROBE_AS_REFERENCE, NULL, close_or_far);
if (location.x_index >= 0 && location.y_index >= 0) {
const float rawx = pgm_read_float(&ubl.mesh_index_to_xpos[location.x_index]), if (location.x_index >= 0) { // mesh point found and is reachable by probe
rawy = pgm_read_float(&ubl.mesh_index_to_ypos[location.y_index]); const float rawx = mesh_index_to_xpos(location.x_index),
rawy = mesh_index_to_ypos(location.y_index);
// TODO: Change to use `position_is_reachable` (for SCARA-compatibility) const float measured_z = probe_pt(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy), stow_probe, g29_verbose_level); // TODO: Needs error handling
if (!WITHIN(rawx, MIN_PROBE_X, MAX_PROBE_X) || !WITHIN(rawy, MIN_PROBE_Y, MAX_PROBE_Y)) { z_values[location.x_index][location.y_index] = measured_z;
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Attempt to probe off the bed.");
ubl.has_control_of_lcd_panel = false;
goto LEAVE;
}
const float measured_z = probe_pt(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy), stow_probe, g29_verbose_level);
ubl.z_values[location.x_index][location.y_index] = measured_z;
} }
if (do_ubl_mesh_map) ubl.display_map(map_type); if (do_ubl_mesh_map) display_map(g29_map_type);
} while (location.x_index >= 0 && location.y_index >= 0); } while (location.x_index >= 0 && --max_iterations);
LEAVE:
STOW_PROBE(); STOW_PROBE();
ubl.restore_ubl_active_state_and_leave(); restore_ubl_active_state_and_leave();
do_blocking_move_to_xy( do_blocking_move_to_xy(
constrain(lx - (X_PROBE_OFFSET_FROM_EXTRUDER), UBL_MESH_MIN_X, UBL_MESH_MAX_X), constrain(lx - (X_PROBE_OFFSET_FROM_EXTRUDER), UBL_MESH_MIN_X, UBL_MESH_MAX_X),
@ -822,9 +869,9 @@
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
float x_tmp = pgm_read_float(&ubl.mesh_index_to_xpos[i]), float x_tmp = mesh_index_to_xpos(i),
y_tmp = pgm_read_float(&ubl.mesh_index_to_ypos[j]), y_tmp = mesh_index_to_ypos(j),
z_tmp = ubl.z_values[i][j]; z_tmp = z_values[i][j];
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPGM("before rotation = ["); SERIAL_ECHOPGM("before rotation = [");
@ -850,12 +897,12 @@
safe_delay(55); safe_delay(55);
} }
#endif #endif
ubl.z_values[i][j] += z_tmp - d; z_values[i][j] += z_tmp - d;
} }
} }
} }
float use_encoder_wheel_to_measure_point() { float unified_bed_leveling::measure_point_with_encoder() {
while (ubl_lcd_clicked()) delay(50); // wait for user to release encoder wheel while (ubl_lcd_clicked()) delay(50); // wait for user to release encoder wheel
delay(50); // debounce delay(50); // debounce
@ -863,107 +910,108 @@
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
while (!ubl_lcd_clicked()) { // we need the loop to move the nozzle based on the encoder wheel here! while (!ubl_lcd_clicked()) { // we need the loop to move the nozzle based on the encoder wheel here!
idle(); idle();
if (ubl.encoder_diff) { if (encoder_diff) {
do_blocking_move_to_z(current_position[Z_AXIS] + 0.01 * float(ubl.encoder_diff)); do_blocking_move_to_z(current_position[Z_AXIS] + 0.01 * float(encoder_diff));
ubl.encoder_diff = 0; encoder_diff = 0;
} }
} }
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
return current_position[Z_AXIS]; return current_position[Z_AXIS];
} }
static void say_and_take_a_measurement() { static void echo_and_take_a_measurement() { SERIAL_PROTOCOLLNPGM(" and take a measurement."); }
SERIAL_PROTOCOLLNPGM(" and take a measurement.");
}
float measure_business_card_thickness(const float &in_height) { float unified_bed_leveling::measure_business_card_thickness(float &in_height) {
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
ubl.save_ubl_active_state_and_disable(); // Disable bed level correction for probing save_ubl_active_state_and_disable(); // Disable bed level correction for probing
do_blocking_move_to_z(in_height); do_blocking_move_to_z(in_height);
do_blocking_move_to_xy(0.5 * (UBL_MESH_MAX_X - (UBL_MESH_MIN_X)), 0.5 * (UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y))); do_blocking_move_to_xy(0.5 * (UBL_MESH_MAX_X - (UBL_MESH_MIN_X)), 0.5 * (UBL_MESH_MAX_Y - (UBL_MESH_MIN_Y)));
//, min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]) / 2.0); //, min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]) / 2.0);
stepper.synchronize(); stepper.synchronize();
SERIAL_PROTOCOLPGM("Place shim under nozzle.");
say_and_take_a_measurement();
const float z1 = use_encoder_wheel_to_measure_point(); SERIAL_PROTOCOLPGM("Place shim under nozzle");
LCD_MESSAGEPGM("Place shim & measure"); // TODO: Make translatable string
lcd_return_to_status();
echo_and_take_a_measurement();
const float z1 = measure_point_with_encoder();
do_blocking_move_to_z(current_position[Z_AXIS] + SIZE_OF_LITTLE_RAISE); do_blocking_move_to_z(current_position[Z_AXIS] + SIZE_OF_LITTLE_RAISE);
stepper.synchronize(); stepper.synchronize();
SERIAL_PROTOCOLPGM("Remove shim."); SERIAL_PROTOCOLPGM("Remove shim");
say_and_take_a_measurement(); LCD_MESSAGEPGM("Remove & measure bed"); // TODO: Make translatable string
echo_and_take_a_measurement();
const float z2 = use_encoder_wheel_to_measure_point(); const float z2 = measure_point_with_encoder();
do_blocking_move_to_z(current_position[Z_AXIS] + SIZE_OF_LITTLE_RAISE);
do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES);
const float thickness = abs(z1 - z2);
if (g29_verbose_level > 1) { if (g29_verbose_level > 1) {
SERIAL_PROTOCOLPGM("Business Card is: "); SERIAL_PROTOCOLPGM("Business Card is ");
SERIAL_PROTOCOL_F(abs(z1 - z2), 6); SERIAL_PROTOCOL_F(thickness, 4);
SERIAL_PROTOCOLLNPGM("mm thick."); SERIAL_PROTOCOLLNPGM("mm thick.");
} }
ubl.has_control_of_lcd_panel = false;
ubl.restore_ubl_active_state_and_leave(); in_height = current_position[Z_AXIS]; // do manual probing at lower height
return abs(z1 - z2);
has_control_of_lcd_panel = false;
restore_ubl_active_state_and_leave();
return thickness;
} }
void manually_probe_remaining_mesh(const float &lx, const float &ly, const float &z_clearance, const float &card_thickness, const bool do_ubl_mesh_map) { void unified_bed_leveling::manually_probe_remaining_mesh(const float &lx, const float &ly, const float &z_clearance, const float &thick, const bool do_ubl_mesh_map) {
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
ubl.save_ubl_active_state_and_disable(); // we don't do bed level correction because we want the raw data when we probe save_ubl_active_state_and_disable(); // we don't do bed level correction because we want the raw data when we probe
do_blocking_move_to_z(z_clearance); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
do_blocking_move_to_xy(lx, ly); do_blocking_move_to_xy(lx, ly);
float last_x = -9999.99, last_y = -9999.99; lcd_return_to_status();
mesh_index_pair location; mesh_index_pair location;
do { do {
location = find_closest_mesh_point_of_type(INVALID, lx, ly, USE_NOZZLE_AS_REFERENCE, NULL, false); location = find_closest_mesh_point_of_type(INVALID, lx, ly, USE_NOZZLE_AS_REFERENCE, NULL, false);
// It doesn't matter if the probe can't reach the NAN location. This is a manual probe. // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
if (location.x_index < 0 && location.y_index < 0) continue; if (location.x_index < 0 && location.y_index < 0) continue;
const float rawx = pgm_read_float(&ubl.mesh_index_to_xpos[location.x_index]), const float rawx = mesh_index_to_xpos(location.x_index),
rawy = pgm_read_float(&ubl.mesh_index_to_ypos[location.y_index]); rawy = mesh_index_to_ypos(location.y_index),
xProbe = LOGICAL_X_POSITION(rawx),
yProbe = LOGICAL_Y_POSITION(rawy);
// TODO: Change to use `position_is_reachable` (for SCARA-compatibility) if (!position_is_reachable_raw_xy(rawx, rawy)) break; // SHOULD NOT OCCUR (find_closest_mesh_point only returns reachable points)
if (!WITHIN(rawx, UBL_MESH_MIN_X, UBL_MESH_MAX_X) || !WITHIN(rawy, UBL_MESH_MIN_Y, UBL_MESH_MAX_Y)) {
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Attempt to probe off the bed.");
ubl.has_control_of_lcd_panel = false;
goto LEAVE;
}
const float xProbe = LOGICAL_X_POSITION(rawx), do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
yProbe = LOGICAL_Y_POSITION(rawy),
dx = xProbe - last_x,
dy = yProbe - last_y;
if (HYPOT(dx, dy) < BIG_RAISE_NOT_NEEDED) LCD_MESSAGEPGM("Moving to next"); // TODO: Make translatable string
do_blocking_move_to_z(current_position[Z_AXIS] + SIZE_OF_LITTLE_RAISE);
else
do_blocking_move_to_z(z_clearance);
do_blocking_move_to_xy(xProbe, yProbe); do_blocking_move_to_xy(xProbe, yProbe);
do_blocking_move_to_z(z_clearance);
last_x = xProbe;
last_y = yProbe;
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
if (do_ubl_mesh_map) ubl.display_map(map_type); // show user where we're probing serialprintPGM(parser.seen('B') ? PSTR("Place shim & measure") : PSTR("Measure")); // TODO: Make translatable strings
while (ubl_lcd_clicked()) delay(50); // wait for user to release encoder wheel while (ubl_lcd_clicked()) delay(50); // wait for user to release encoder wheel
delay(50); // debounce delay(50); // debounce
while (!ubl_lcd_clicked()) { // we need the loop to move the nozzle based on the encoder wheel here! while (!ubl_lcd_clicked()) { // we need the loop to move the nozzle based on the encoder wheel here!
idle(); idle();
if (ubl.encoder_diff) { if (encoder_diff) {
do_blocking_move_to_z(current_position[Z_AXIS] + float(ubl.encoder_diff) / 100.0); do_blocking_move_to_z(current_position[Z_AXIS] + float(encoder_diff) / 100.0);
ubl.encoder_diff = 0; encoder_diff = 0;
} }
} }
// this sequence to detect an ubl_lcd_clicked() debounce it and leave if it is
// a Press and Hold is repeated in a lot of places (including G26_Mesh_Validation.cpp). This
// should be redone and compressed.
const millis_t nxt = millis() + 1500L; const millis_t nxt = millis() + 1500L;
while (ubl_lcd_clicked()) { // debounce and watch for abort while (ubl_lcd_clicked()) { // debounce and watch for abort
idle(); idle();
@ -972,124 +1020,116 @@
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
lcd_quick_feedback(); lcd_quick_feedback();
while (ubl_lcd_clicked()) idle(); while (ubl_lcd_clicked()) idle();
ubl.has_control_of_lcd_panel = false; has_control_of_lcd_panel = false;
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
ubl.restore_ubl_active_state_and_leave(); restore_ubl_active_state_and_leave();
return; return;
} }
} }
ubl.z_values[location.x_index][location.y_index] = current_position[Z_AXIS] - card_thickness; z_values[location.x_index][location.y_index] = current_position[Z_AXIS] - thick;
if (g29_verbose_level > 2) { if (g29_verbose_level > 2) {
SERIAL_PROTOCOLPGM("Mesh Point Measured at: "); SERIAL_PROTOCOLPGM("Mesh Point Measured at: ");
SERIAL_PROTOCOL_F(ubl.z_values[location.x_index][location.y_index], 6); SERIAL_PROTOCOL_F(z_values[location.x_index][location.y_index], 6);
SERIAL_EOL; SERIAL_EOL;
} }
} while (location.x_index >= 0 && location.y_index >= 0); } while (location.x_index >= 0 && location.y_index >= 0);
if (do_ubl_mesh_map) ubl.display_map(map_type); if (do_ubl_mesh_map) display_map(g29_map_type);
LEAVE: restore_ubl_active_state_and_leave();
ubl.restore_ubl_active_state_and_leave();
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
do_blocking_move_to_xy(lx, ly); do_blocking_move_to_xy(lx, ly);
} }
static void say_ubl_name() { bool unified_bed_leveling::g29_parameter_parsing() {
SERIAL_PROTOCOLPGM("Unified Bed Leveling ");
}
static void report_ubl_state() {
say_ubl_name();
SERIAL_PROTOCOLPGM("System ");
if (!ubl.state.active) SERIAL_PROTOCOLPGM("de");
SERIAL_PROTOCOLLNPGM("activated.\n");
}
bool g29_parameter_parsing() {
bool err_flag = false; bool err_flag = false;
LCD_MESSAGEPGM("Doing G29 UBL!"); LCD_MESSAGEPGM("Doing G29 UBL!"); // TODO: Make translatable string
lcd_quick_feedback(); lcd_quick_feedback();
ubl_constant = 0.0; g29_constant = 0.0;
repetition_cnt = 0; g29_repetition_cnt = 0;
x_flag = code_seen('X') && code_has_value(); g29_x_flag = parser.seen('X') && parser.has_value();
x_pos = x_flag ? code_value_float() : current_position[X_AXIS]; g29_x_pos = g29_x_flag ? parser.value_float() : current_position[X_AXIS];
y_flag = code_seen('Y') && code_has_value(); g29_y_flag = parser.seen('Y') && parser.has_value();
y_pos = y_flag ? code_value_float() : current_position[Y_AXIS]; g29_y_pos = g29_y_flag ? parser.value_float() : current_position[Y_AXIS];
repeat_flag = code_seen('R'); if (parser.seen('R')) {
if (repeat_flag) { g29_repetition_cnt = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS;
repetition_cnt = code_has_value() ? code_value_int() : (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y); NOMORE(g29_repetition_cnt, GRID_MAX_POINTS);
if (repetition_cnt < 1) { if (g29_repetition_cnt < 1) {
SERIAL_PROTOCOLLNPGM("?(R)epetition count invalid (1+).\n"); SERIAL_PROTOCOLLNPGM("?(R)epetition count invalid (1+).\n");
return UBL_ERR; return UBL_ERR;
} }
} }
g29_verbose_level = code_seen('V') ? code_value_int() : 0; g29_verbose_level = parser.seen('V') ? parser.value_int() : 0;
if (!WITHIN(g29_verbose_level, 0, 4)) { if (!WITHIN(g29_verbose_level, 0, 4)) {
SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0-4).\n"); SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0-4).\n");
err_flag = true; err_flag = true;
} }
if (code_seen('P')) { if (parser.seen('P')) {
phase_value = code_value_int(); g29_phase_value = parser.value_int();
if (!WITHIN(phase_value, 0, 6)) { if (!WITHIN(g29_phase_value, 0, 6)) {
SERIAL_PROTOCOLLNPGM("?(P)hase value invalid (0-6).\n"); SERIAL_PROTOCOLLNPGM("?(P)hase value invalid (0-6).\n");
err_flag = true; err_flag = true;
} }
} }
if (code_seen('J')) { if (parser.seen('J')) {
grid_size = code_has_value() ? code_value_int() : 3; g29_grid_size = parser.has_value() ? parser.value_int() : 0;
if (!WITHIN(grid_size, 2, 9)) { if (g29_grid_size && !WITHIN(g29_grid_size, 2, 9)) {
SERIAL_PROTOCOLLNPGM("?Invalid grid size (J) specified (2-9).\n"); SERIAL_PROTOCOLLNPGM("?Invalid grid size (J) specified (2-9).\n");
err_flag = true; err_flag = true;
} }
} }
if (x_flag != y_flag) { if (g29_x_flag != g29_y_flag) {
SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n"); SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n");
err_flag = true; err_flag = true;
} }
if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_POS, X_MAX_POS)) {
if (!WITHIN(RAW_X_POSITION(x_pos), X_MIN_POS, X_MAX_POS)) {
SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n"); SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n");
err_flag = true; err_flag = true;
} }
if (!WITHIN(RAW_Y_POSITION(y_pos), Y_MIN_POS, Y_MAX_POS)) { if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_POS, Y_MAX_POS)) {
SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n"); SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n");
err_flag = true; err_flag = true;
} }
if (err_flag) return UBL_ERR; if (err_flag) return UBL_ERR;
// Activate or deactivate UBL /**
if (code_seen('A')) { * Activate or deactivate UBL
if (code_seen('D')) { * Note: UBL's G29 restores the state set here when done.
* Leveling is being enabled here with old data, possibly
* none. Error handling should disable for safety...
*/
if (parser.seen('A')) {
if (parser.seen('D')) {
SERIAL_PROTOCOLLNPGM("?Can't activate and deactivate at the same time.\n"); SERIAL_PROTOCOLLNPGM("?Can't activate and deactivate at the same time.\n");
return UBL_ERR; return UBL_ERR;
} }
ubl.state.active = 1; state.active = true;
report_ubl_state(); report_state();
} }
else if (code_seen('D')) { else if (parser.seen('D')) {
ubl.state.active = 0; state.active = false;
report_ubl_state(); report_state();
} }
// Set global 'C' flag and its value // Set global 'C' flag and its value
if ((c_flag = code_seen('C'))) if ((g29_c_flag = parser.seen('C')))
ubl_constant = code_value_float(); g29_constant = parser.value_float();
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (code_seen('F') && code_has_value()) { if (parser.seen('F') && parser.has_value()) {
const float fh = code_value_float(); const float fh = parser.value_float();
if (!WITHIN(fh, 0.0, 100.0)) { if (!WITHIN(fh, 0.0, 100.0)) {
SERIAL_PROTOCOLLNPGM("?(F)ade height for Bed Level Correction not plausible.\n"); SERIAL_PROTOCOLLNPGM("?(F)ade height for Bed Level Correction not plausible.\n");
return UBL_ERR; return UBL_ERR;
@ -1098,47 +1138,14 @@
} }
#endif #endif
map_type = code_seen('O') && code_has_value() ? code_value_int() : 0; g29_map_type = parser.seen('T') && parser.has_value() ? parser.value_int() : 0;
if (!WITHIN(map_type, 0, 1)) { if (!WITHIN(g29_map_type, 0, 1)) {
SERIAL_PROTOCOLLNPGM("Invalid map type.\n"); SERIAL_PROTOCOLLNPGM("Invalid map type.\n");
return UBL_ERR; return UBL_ERR;
} }
if (code_seen('M')) { // Check if a map type was specified
map_type = code_has_value() ? code_value_int() : 0;
if (!WITHIN(map_type, 0, 1)) {
SERIAL_PROTOCOLLNPGM("Invalid map type.\n");
return UBL_ERR;
}
}
return UBL_OK; return UBL_OK;
} }
/**
* This function goes away after G29 debug is complete. But for right now, it is a handy
* routine to dump binary data structures.
*/
/*
void dump(char * const str, const float &f) {
char *ptr;
SERIAL_PROTOCOL(str);
SERIAL_PROTOCOL_F(f, 8);
SERIAL_PROTOCOLPGM(" ");
ptr = (char*)&f;
for (uint8_t i = 0; i < 4; i++)
SERIAL_PROTOCOLPAIR(" ", hex_byte(*ptr++));
SERIAL_PROTOCOLPAIR(" isnan()=", isnan(f));
SERIAL_PROTOCOLPAIR(" isinf()=", isinf(f));
if (f == -INFINITY)
SERIAL_PROTOCOLPGM(" Minus Infinity detected.");
SERIAL_EOL;
}
//*/
static int ubl_state_at_invocation = 0, static int ubl_state_at_invocation = 0,
ubl_state_recursion_chk = 0; ubl_state_recursion_chk = 0;
@ -1146,44 +1153,35 @@
ubl_state_recursion_chk++; ubl_state_recursion_chk++;
if (ubl_state_recursion_chk != 1) { if (ubl_state_recursion_chk != 1) {
SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row."); SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row.");
LCD_MESSAGEPGM("save_UBL_active() error"); LCD_MESSAGEPGM("save_UBL_active() error"); // TODO: Make translatable string
lcd_quick_feedback(); lcd_quick_feedback();
return; return;
} }
ubl_state_at_invocation = ubl.state.active; ubl_state_at_invocation = state.active;
ubl.state.active = 0; state.active = 0;
} }
void unified_bed_leveling::restore_ubl_active_state_and_leave() { void unified_bed_leveling::restore_ubl_active_state_and_leave() {
if (--ubl_state_recursion_chk) { if (--ubl_state_recursion_chk) {
SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times."); SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
LCD_MESSAGEPGM("restore_UBL_active() error"); LCD_MESSAGEPGM("restore_UBL_active() error"); // TODO: Make translatable string
lcd_quick_feedback(); lcd_quick_feedback();
return; return;
} }
ubl.state.active = ubl_state_at_invocation; state.active = ubl_state_at_invocation;
} }
/** /**
* Much of the 'What?' command can be eliminated. But until we are fully debugged, it is * Much of the 'What?' command can be eliminated. But until we are fully debugged, it is
* good to have the extra information. Soon... we prune this to just a few items * good to have the extra information. Soon... we prune this to just a few items
*/ */
void g29_what_command() { void unified_bed_leveling::g29_what_command() {
const uint16_t k = E2END - ubl.eeprom_start; report_state();
say_ubl_name(); if (state.storage_slot == -1)
SERIAL_PROTOCOLPGM("System Version " UBL_VERSION " ");
if (ubl.state.active)
SERIAL_PROTOCOLCHAR('A');
else
SERIAL_PROTOCOLPGM("Ina");
SERIAL_PROTOCOLLNPGM("ctive.\n");
safe_delay(50);
if (ubl.state.eeprom_storage_slot == -1)
SERIAL_PROTOCOLPGM("No Mesh Loaded."); SERIAL_PROTOCOLPGM("No Mesh Loaded.");
else { else {
SERIAL_PROTOCOLPAIR("Mesh ", ubl.state.eeprom_storage_slot); SERIAL_PROTOCOLPAIR("Mesh ", state.storage_slot);
SERIAL_PROTOCOLPGM(" Loaded."); SERIAL_PROTOCOLPGM(" Loaded.");
} }
SERIAL_EOL; SERIAL_EOL;
@ -1192,32 +1190,43 @@
SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt); SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt);
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
SERIAL_PROTOCOLLNPAIR("planner.z_fade_height : ", planner.z_fade_height); SERIAL_PROTOCOL("planner.z_fade_height : ");
SERIAL_PROTOCOL_F(planner.z_fade_height, 4);
SERIAL_EOL;
#endif #endif
#if HAS_BED_PROBE
SERIAL_PROTOCOLPGM("zprobe_zoffset: "); SERIAL_PROTOCOLPGM("zprobe_zoffset: ");
SERIAL_PROTOCOL_F(zprobe_zoffset, 7); SERIAL_PROTOCOL_F(zprobe_zoffset, 7);
SERIAL_EOL; SERIAL_EOL;
#endif
SERIAL_PROTOCOLPGM("z_offset: "); SERIAL_ECHOLNPAIR("UBL_MESH_MIN_X " STRINGIFY(UBL_MESH_MIN_X) "=", UBL_MESH_MIN_X);
SERIAL_PROTOCOL_F(ubl.state.z_offset, 7); SERIAL_ECHOLNPAIR("UBL_MESH_MIN_Y " STRINGIFY(UBL_MESH_MIN_Y) "=", UBL_MESH_MIN_Y);
SERIAL_EOL; safe_delay(25);
SERIAL_ECHOLNPAIR("UBL_MESH_MAX_X " STRINGIFY(UBL_MESH_MAX_X) "=", UBL_MESH_MAX_X);
SERIAL_ECHOLNPAIR("UBL_MESH_MAX_Y " STRINGIFY(UBL_MESH_MAX_Y) "=", UBL_MESH_MAX_Y);
safe_delay(25);
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X);
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y);
safe_delay(25);
SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST);
SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST);
safe_delay(25); safe_delay(25);
SERIAL_PROTOCOLLNPAIR("ubl.eeprom_start=", hex_address((void*)ubl.eeprom_start));
SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: "); SERIAL_PROTOCOLPGM("X-Axis Mesh Points at: ");
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(pgm_read_float(&ubl.mesh_index_to_xpos[i])), 1); SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(mesh_index_to_xpos(i)), 3);
SERIAL_PROTOCOLPGM(" "); SERIAL_PROTOCOLPGM(" ");
safe_delay(50); safe_delay(25);
} }
SERIAL_EOL; SERIAL_EOL;
SERIAL_PROTOCOLPGM("Y-Axis Mesh Points at: "); SERIAL_PROTOCOLPGM("Y-Axis Mesh Points at: ");
for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_Y; i++) {
SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(pgm_read_float(&ubl.mesh_index_to_ypos[i])), 1); SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(mesh_index_to_ypos(i)), 3);
SERIAL_PROTOCOLPGM(" "); SERIAL_PROTOCOLPGM(" ");
safe_delay(50); safe_delay(25);
} }
SERIAL_EOL; SERIAL_EOL;
@ -1233,44 +1242,26 @@
SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk); SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk);
SERIAL_EOL; SERIAL_EOL;
safe_delay(50); safe_delay(50);
SERIAL_PROTOCOLLNPAIR("Free EEPROM space starts at: ", hex_address((void*)ubl.eeprom_start));
SERIAL_PROTOCOLLNPAIR("end of EEPROM : ", hex_address((void*)E2END)); SERIAL_PROTOCOLPAIR("Meshes go from ", hex_address((void*)settings.get_start_of_meshes()));
SERIAL_PROTOCOLLNPAIR(" to ", hex_address((void*)settings.get_end_of_meshes()));
safe_delay(50); safe_delay(50);
SERIAL_PROTOCOLLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl)); SERIAL_PROTOCOLLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl));
SERIAL_EOL; SERIAL_EOL;
SERIAL_PROTOCOLLNPAIR("z_value[][] size: ", (int)sizeof(ubl.z_values)); SERIAL_PROTOCOLLNPAIR("z_value[][] size: ", (int)sizeof(z_values));
SERIAL_EOL; SERIAL_EOL;
safe_delay(50); safe_delay(25);
SERIAL_PROTOCOLLNPAIR("EEPROM free for UBL: ", hex_address((void*)k)); SERIAL_PROTOCOLLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.get_end_of_meshes() - settings.get_start_of_meshes())));
safe_delay(50); safe_delay(50);
SERIAL_PROTOCOLPAIR("EEPROM can hold ", k / sizeof(ubl.z_values)); SERIAL_PROTOCOLPAIR("EEPROM can hold ", settings.calc_num_meshes());
SERIAL_PROTOCOLLNPGM(" meshes.\n"); SERIAL_PROTOCOLLNPGM(" meshes.\n");
safe_delay(50); safe_delay(25);
SERIAL_PROTOCOLPAIR("sizeof(ubl.state) : ", (int)sizeof(ubl.state));
SERIAL_PROTOCOLPAIR("\nGRID_MAX_POINTS_X ", GRID_MAX_POINTS_X);
SERIAL_PROTOCOLPAIR("\nGRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y);
safe_delay(50);
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_X ", UBL_MESH_MIN_X);
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MIN_Y ", UBL_MESH_MIN_Y);
safe_delay(50);
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MAX_X ", UBL_MESH_MAX_X);
SERIAL_PROTOCOLPAIR("\nUBL_MESH_MAX_Y ", UBL_MESH_MAX_Y);
safe_delay(50);
SERIAL_PROTOCOLPGM("\nMESH_X_DIST ");
SERIAL_PROTOCOL_F(MESH_X_DIST, 6);
SERIAL_PROTOCOLPGM("\nMESH_Y_DIST ");
SERIAL_PROTOCOL_F(MESH_Y_DIST, 6);
SERIAL_EOL;
safe_delay(50);
if (!ubl.sanity_check()) { if (!sanity_check()) {
say_ubl_name(); echo_name();
SERIAL_PROTOCOLLNPGM(" sanity checks passed."); SERIAL_PROTOCOLLNPGM(" sanity checks passed.");
} }
} }
@ -1279,7 +1270,7 @@
* When we are fully debugged, the EEPROM dump command will get deleted also. But * When we are fully debugged, the EEPROM dump command will get deleted also. But
* right now, it is good to have the extra information. Soon... we prune this. * right now, it is good to have the extra information. Soon... we prune this.
*/ */
void g29_eeprom_dump() { void unified_bed_leveling::g29_eeprom_dump() {
unsigned char cccc; unsigned char cccc;
uint16_t kkkk; uint16_t kkkk;
@ -1304,74 +1295,73 @@
* When we are fully debugged, this may go away. But there are some valid * When we are fully debugged, this may go away. But there are some valid
* use cases for the users. So we can wait and see what to do with it. * use cases for the users. So we can wait and see what to do with it.
*/ */
void g29_compare_current_mesh_to_stored_mesh() { void unified_bed_leveling::g29_compare_current_mesh_to_stored_mesh() {
float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; int16_t a = settings.calc_num_meshes();
if (!code_has_value()) { if (!a) {
SERIAL_PROTOCOLLNPGM("?Mesh # required.\n"); SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
return; return;
} }
storage_slot = code_value_int();
int16_t j = (UBL_LAST_EEPROM_INDEX - ubl.eeprom_start) / sizeof(tmp_z_values); if (!parser.has_value()) {
SERIAL_PROTOCOLLNPGM("?Storage slot # required.");
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", a - 1);
return;
}
if (!WITHIN(storage_slot, 0, j - 1) || ubl.eeprom_start <= 0) { g29_storage_slot = parser.value_int();
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available for use.\n");
if (!WITHIN(g29_storage_slot, 0, a - 1)) {
SERIAL_PROTOCOLLNPGM("?Invalid storage slot.");
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", a - 1);
return; return;
} }
j = UBL_LAST_EEPROM_INDEX - (storage_slot + 1) * sizeof(tmp_z_values); float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
eeprom_read_block((void *)&tmp_z_values, (void *)j, sizeof(tmp_z_values)); settings.load_mesh(g29_storage_slot, &tmp_z_values);
SERIAL_ECHOPAIR("Subtracting Mesh ", storage_slot); SERIAL_PROTOCOLPAIR("Subtracting mesh in slot ", g29_storage_slot);
SERIAL_PROTOCOLLNPAIR(" loaded from EEPROM address ", hex_address((void*)j)); // Soon, we can remove the extra clutter of printing SERIAL_PROTOCOLLNPGM(" from current mesh.");
// the address in the EEPROM where the Mesh is stored.
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
ubl.z_values[x][y] -= tmp_z_values[x][y]; z_values[x][y] -= tmp_z_values[x][y];
} }
mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType type, const float &lx, const float &ly, const bool probe_as_reference, unsigned int bits[16], const bool far_flag) { mesh_index_pair unified_bed_leveling::find_closest_mesh_point_of_type(const MeshPointType type, const float &lx, const float &ly, const bool probe_as_reference, unsigned int bits[16], const bool far_flag) {
mesh_index_pair out_mesh; mesh_index_pair out_mesh;
out_mesh.x_index = out_mesh.y_index = -1; out_mesh.x_index = out_mesh.y_index = -1;
const float current_x = current_position[X_AXIS],
current_y = current_position[Y_AXIS];
// Get our reference position. Either the nozzle or probe location. // Get our reference position. Either the nozzle or probe location.
const float px = lx - (probe_as_reference == USE_PROBE_AS_REFERENCE ? X_PROBE_OFFSET_FROM_EXTRUDER : 0), const float px = RAW_X_POSITION(lx) - (probe_as_reference == USE_PROBE_AS_REFERENCE ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
py = ly - (probe_as_reference == USE_PROBE_AS_REFERENCE ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0); py = RAW_Y_POSITION(ly) - (probe_as_reference == USE_PROBE_AS_REFERENCE ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
float closest = far_flag ? -99999.99 : 99999.99; float best_so_far = far_flag ? -99999.99 : 99999.99;
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
if ( (type == INVALID && isnan(ubl.z_values[i][j])) // Check to see if this location holds the right thing if ( (type == INVALID && isnan(z_values[i][j])) // Check to see if this location holds the right thing
|| (type == REAL && !isnan(ubl.z_values[i][j])) || (type == REAL && !isnan(z_values[i][j]))
|| (type == SET_IN_BITMAP && is_bit_set(bits, i, j)) || (type == SET_IN_BITMAP && is_bit_set(bits, i, j))
) { ) {
// We only get here if we found a Mesh Point of the specified type // We only get here if we found a Mesh Point of the specified type
const float rawx = pgm_read_float(&ubl.mesh_index_to_xpos[i]), // Check if we can probe this mesh location float raw_x = RAW_CURRENT_POSITION(X), raw_y = RAW_CURRENT_POSITION(Y);
rawy = pgm_read_float(&ubl.mesh_index_to_ypos[j]); const float mx = mesh_index_to_xpos(i),
my = mesh_index_to_ypos(j);
// If using the probe as the reference there are some unreachable locations. // If using the probe as the reference there are some unreachable locations.
// Also for round beds, there are grid points outside the bed the nozzle can't reach.
// Prune them from the list and ignore them till the next Phase (manual nozzle probing). // Prune them from the list and ignore them till the next Phase (manual nozzle probing).
if (probe_as_reference == USE_PROBE_AS_REFERENCE && if (probe_as_reference ? !position_is_reachable_by_probe_raw_xy(mx, my) : !position_is_reachable_raw_xy(mx, my))
(!WITHIN(rawx, MIN_PROBE_X, MAX_PROBE_X) || !WITHIN(rawy, MIN_PROBE_Y, MAX_PROBE_Y)) continue;
) continue;
// Unreachable. Check if it's the closest location to the nozzle. // Reachable. Check if it's the best_so_far location to the nozzle.
// Add in a weighting factor that considers the current location of the nozzle. // Add in a weighting factor that considers the current location of the nozzle.
const float mx = LOGICAL_X_POSITION(rawx), // Check if we can probe this mesh location float distance = HYPOT(px - mx, py - my);
my = LOGICAL_Y_POSITION(rawy);
float distance = HYPOT(px - mx, py - my) + HYPOT(current_x - mx, current_y - my) * 0.1;
/** /**
* If doing the far_flag action, we want to be as far as possible * If doing the far_flag action, we want to be as far as possible
@ -1383,20 +1373,24 @@
if (far_flag) { if (far_flag) {
for (uint8_t k = 0; k < GRID_MAX_POINTS_X; k++) { for (uint8_t k = 0; k < GRID_MAX_POINTS_X; k++) {
for (uint8_t l = 0; l < GRID_MAX_POINTS_Y; l++) { for (uint8_t l = 0; l < GRID_MAX_POINTS_Y; l++) {
if (!isnan(ubl.z_values[k][l])) { if (i != k && j != l && !isnan(z_values[k][l])) {
distance += sq(i - k) * (MESH_X_DIST) * .05 //distance += pow((float) abs(i - k) * (MESH_X_DIST), 2) + pow((float) abs(j - l) * (MESH_Y_DIST), 2); // working here
+ sq(j - l) * (MESH_Y_DIST) * .05; distance += HYPOT(MESH_X_DIST, MESH_Y_DIST) / log(HYPOT((i - k) * (MESH_X_DIST) + .001, (j - l) * (MESH_Y_DIST)) + .001);
} }
} }
} }
} }
else
// factor in the distance from the current location for the normal case
// so the nozzle isn't running all over the bed.
distance += HYPOT(raw_x - mx, raw_y - my) * 0.1;
// if far_flag, look for farthest point // if far_flag, look for farthest point
if (far_flag == (distance > closest) && distance != closest) { if (far_flag == (distance > best_so_far) && distance != best_so_far) {
closest = distance; // We found a closer/farther location with best_so_far = distance; // We found a closer/farther location with
out_mesh.x_index = i; // the specified type of mesh value. out_mesh.x_index = i; // the specified type of mesh value.
out_mesh.y_index = j; out_mesh.y_index = j;
out_mesh.distance = closest; out_mesh.distance = best_so_far;
} }
} }
} // for j } // for j
@ -1405,81 +1399,85 @@
return out_mesh; return out_mesh;
} }
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map) { void unified_bed_leveling::fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map) {
if (!code_seen('R')) // fine_tune_mesh() is special. If no repetion count flag is specified if (!parser.seen('R')) // fine_tune_mesh() is special. If no repetition count flag is specified
repetition_cnt = 1; // we know to do exactly one mesh location. Otherwise we use what the parser decided. g29_repetition_cnt = 1; // do exactly one mesh location. Otherwise use what the parser decided.
mesh_index_pair location; mesh_index_pair location;
uint16_t not_done[16]; uint16_t not_done[16];
int32_t round_off;
ubl.save_ubl_active_state_and_disable(); if (!position_is_reachable_xy(lx, ly)) {
SERIAL_PROTOCOLLNPGM("(X,Y) outside printable radius.");
return;
}
save_ubl_active_state_and_disable();
memset(not_done, 0xFF, sizeof(not_done)); memset(not_done, 0xFF, sizeof(not_done));
LCD_MESSAGEPGM("Fine Tuning Mesh"); LCD_MESSAGEPGM("Fine Tuning Mesh"); // TODO: Make translatable string
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
do_blocking_move_to_xy(lx, ly); do_blocking_move_to_xy(lx, ly);
do { do {
location = find_closest_mesh_point_of_type(SET_IN_BITMAP, lx, ly, USE_NOZZLE_AS_REFERENCE, not_done, false); location = find_closest_mesh_point_of_type(SET_IN_BITMAP, lx, ly, USE_NOZZLE_AS_REFERENCE, not_done, false);
// It doesn't matter if the probe can't reach this
// location. This is a manual edit of the Mesh Point. if (location.x_index < 0) break; // stop when we can't find any more reachable points.
if (location.x_index < 0 && location.y_index < 0) continue; // abort if we can't find any more points.
bit_clear(not_done, location.x_index, location.y_index); // Mark this location as 'adjusted' so we will find a bit_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 // different location the next time through the loop
const float rawx = pgm_read_float(&ubl.mesh_index_to_xpos[location.x_index]), const float rawx = mesh_index_to_xpos(location.x_index),
rawy = pgm_read_float(&ubl.mesh_index_to_ypos[location.y_index]); rawy = mesh_index_to_ypos(location.y_index);
// TODO: Change to use `position_is_reachable` (for SCARA-compatibility) if (!position_is_reachable_raw_xy(rawx, rawy)) // SHOULD NOT OCCUR because find_closest_mesh_point_of_type will only return reachable
if (!WITHIN(rawx, UBL_MESH_MIN_X, UBL_MESH_MAX_X) || !WITHIN(rawy, UBL_MESH_MIN_Y, UBL_MESH_MAX_Y)) { // In theory, we don't need this check. break;
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Attempt to edit off the bed."); // This really can't happen, but do the check for now
ubl.has_control_of_lcd_panel = false;
goto FINE_TUNE_EXIT;
}
float new_z = ubl.z_values[location.x_index][location.y_index]; float new_z = z_values[location.x_index][location.y_index];
if (!isnan(new_z)) { //can't fine tune a point that hasn't been probed if (isnan(new_z)) // if the mesh point is invalid, set it to 0.0 so it can be edited
new_z = 0.0;
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); // Move the nozzle to where we are going to edit do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES); // Move the nozzle to where we are going to edit
do_blocking_move_to_xy(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy)); do_blocking_move_to_xy(LOGICAL_X_POSITION(rawx), LOGICAL_Y_POSITION(rawy));
round_off = (int32_t)(new_z * 1000.0); // we chop off the last digits just to be clean. We are rounding to the new_z = floor(new_z * 1000.0) * 0.001; // Chop off digits after the 1000ths place
new_z = float(round_off) / 1000.0;
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
if (do_ubl_mesh_map) ubl.display_map(map_type); // show the user which point is being adjusted if (do_ubl_mesh_map) display_map(g29_map_type); // show the user which point is being adjusted
lcd_implementation_clear(); lcd_refresh();
lcd_mesh_edit_setup(new_z); lcd_mesh_edit_setup(new_z);
do { do {
new_z = lcd_mesh_edit(); new_z = lcd_mesh_edit();
#ifdef UBL_MESH_EDIT_MOVES_Z
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES + new_z); // Move the nozzle as the point is edited
#endif
idle(); idle();
} while (!ubl_lcd_clicked()); } while (!ubl_lcd_clicked());
lcd_return_to_status(); lcd_return_to_status();
// There is a race condition for the Encoder Wheel getting clicked. // 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) // It could get detected in lcd_mesh_edit (actually _lcd_mesh_fine_tune) or here.
// or here. // Let's work on specifying a proper API for the LCD ASAP, OK?
ubl.has_control_of_lcd_panel = true; has_control_of_lcd_panel = true;
}
// this sequence to detect an ubl_lcd_clicked() debounce it and leave if it is
// a Press and Hold is repeated in a lot of places (including G26_Mesh_Validation.cpp). This
// should be redone and compressed.
const millis_t nxt = millis() + 1500UL; const millis_t nxt = millis() + 1500UL;
while (ubl_lcd_clicked()) { // debounce and watch for abort while (ubl_lcd_clicked()) { // debounce and watch for abort
idle(); idle();
if (ELAPSED(millis(), nxt)) { if (ELAPSED(millis(), nxt)) {
lcd_return_to_status(); lcd_return_to_status();
//SERIAL_PROTOCOLLNPGM("\nFine Tuning of Mesh Stopped."); //SERIAL_PROTOCOLLNPGM("\nFine Tuning of Mesh Stopped.");
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
LCD_MESSAGEPGM("Mesh Editing Stopped"); LCD_MESSAGEPGM("Mesh Editing Stopped"); // TODO: Make translatable string
while (ubl_lcd_clicked()) idle(); while (ubl_lcd_clicked()) idle();
@ -1489,24 +1487,24 @@
safe_delay(20); // We don't want any switch noise. safe_delay(20); // We don't want any switch noise.
ubl.z_values[location.x_index][location.y_index] = new_z; z_values[location.x_index][location.y_index] = new_z;
lcd_implementation_clear(); lcd_refresh();
} while (location.x_index >= 0 && location.y_index >= 0 && (--repetition_cnt>0)); } while (location.x_index >= 0 && --g29_repetition_cnt > 0);
FINE_TUNE_EXIT: FINE_TUNE_EXIT:
ubl.has_control_of_lcd_panel = false; has_control_of_lcd_panel = false;
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
if (do_ubl_mesh_map) ubl.display_map(map_type); if (do_ubl_mesh_map) display_map(g29_map_type);
ubl.restore_ubl_active_state_and_leave(); restore_ubl_active_state_and_leave();
do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE); do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
do_blocking_move_to_xy(lx, ly); do_blocking_move_to_xy(lx, ly);
LCD_MESSAGEPGM("Done Editing Mesh"); LCD_MESSAGEPGM("Done Editing Mesh"); // TODO: Make translatable string
SERIAL_ECHOLNPGM("Done Editing Mesh"); SERIAL_ECHOLNPGM("Done Editing Mesh");
} }
@ -1516,15 +1514,15 @@
* calculate a 'reasonable' value for the unprobed mesh point. * calculate a 'reasonable' value for the unprobed mesh point.
*/ */
bool smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir) { bool unified_bed_leveling::smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir) {
const int8_t x1 = x + xdir, x2 = x1 + xdir, const int8_t x1 = x + xdir, x2 = x1 + xdir,
y1 = y + ydir, y2 = y1 + ydir; y1 = y + ydir, y2 = y1 + ydir;
// A NAN next to a pair of real values? // A NAN next to a pair of real values?
if (isnan(ubl.z_values[x][y]) && !isnan(ubl.z_values[x1][y1]) && !isnan(ubl.z_values[x2][y2])) { if (isnan(z_values[x][y]) && !isnan(z_values[x1][y1]) && !isnan(z_values[x2][y2])) {
if (ubl.z_values[x1][y1] < ubl.z_values[x2][y2]) // Angled downward? if (z_values[x1][y1] < z_values[x2][y2]) // Angled downward?
ubl.z_values[x][y] = ubl.z_values[x1][y1]; // Use nearest (maybe a little too high.) z_values[x][y] = z_values[x1][y1]; // Use nearest (maybe a little too high.)
else else
ubl.z_values[x][y] = 2.0 * ubl.z_values[x1][y1] - ubl.z_values[x2][y2]; // Angled upward... z_values[x][y] = 2.0 * z_values[x1][y1] - z_values[x2][y2]; // Angled upward...
return true; return true;
} }
return false; return false;
@ -1532,7 +1530,7 @@
typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info; typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info;
void smart_fill_mesh() { void unified_bed_leveling::smart_fill_mesh() {
const smart_fill_info info[] = { const smart_fill_info info[] = {
{ 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false }, // Bottom of the mesh looking up { 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false }, // Bottom of the mesh looking up
{ 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false }, // Top of the mesh looking down { 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false }, // Top of the mesh looking down
@ -1562,18 +1560,18 @@
y_min = max(MIN_PROBE_Y, UBL_MESH_MIN_Y), y_min = max(MIN_PROBE_Y, UBL_MESH_MIN_Y),
y_max = min(MAX_PROBE_Y, UBL_MESH_MAX_Y); y_max = min(MAX_PROBE_Y, UBL_MESH_MAX_Y);
const float dx = float(x_max - x_min) / (grid_size - 1.0), const float dx = float(x_max - x_min) / (g29_grid_size - 1.0),
dy = float(y_max - y_min) / (grid_size - 1.0); dy = float(y_max - y_min) / (g29_grid_size - 1.0);
struct linear_fit_data lsf_results; struct linear_fit_data lsf_results;
incremental_LSF_reset(&lsf_results); incremental_LSF_reset(&lsf_results);
bool zig_zag = false; bool zig_zag = false;
for (uint8_t ix = 0; ix < grid_size; ix++) { for (uint8_t ix = 0; ix < g29_grid_size; ix++) {
const float x = float(x_min) + ix * dx; const float x = float(x_min) + ix * dx;
for (int8_t iy = 0; iy < grid_size; iy++) { for (int8_t iy = 0; iy < g29_grid_size; iy++) {
const float y = float(y_min) + dy * (zig_zag ? grid_size - 1 - iy : iy); const float y = float(y_min) + dy * (zig_zag ? g29_grid_size - 1 - iy : iy);
float measured_z = probe_pt(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y), code_seen('E'), g29_verbose_level); float measured_z = probe_pt(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y), parser.seen('E'), g29_verbose_level); // TODO: Needs error handling
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
SERIAL_CHAR('('); SERIAL_CHAR('(');
@ -1588,11 +1586,11 @@
SERIAL_ECHOPGM(") measured: "); SERIAL_ECHOPGM(") measured: ");
SERIAL_PROTOCOL_F(measured_z, 7); SERIAL_PROTOCOL_F(measured_z, 7);
SERIAL_ECHOPGM(" correction: "); SERIAL_ECHOPGM(" correction: ");
SERIAL_PROTOCOL_F(ubl.get_z_correction(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y)), 7); SERIAL_PROTOCOL_F(get_z_correction(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y)), 7);
} }
#endif #endif
measured_z -= ubl.get_z_correction(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y)) /* + zprobe_zoffset */ ; measured_z -= get_z_correction(LOGICAL_X_POSITION(x), LOGICAL_Y_POSITION(y)) /* + zprobe_zoffset */ ;
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
@ -1639,9 +1637,9 @@
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
float x_tmp = pgm_read_float(&ubl.mesh_index_to_xpos[i]), float x_tmp = mesh_index_to_xpos(i),
y_tmp = pgm_read_float(&ubl.mesh_index_to_ypos[j]), y_tmp = mesh_index_to_ypos(j),
z_tmp = ubl.z_values[i][j]; z_tmp = z_values[i][j];
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
@ -1671,7 +1669,7 @@
} }
#endif #endif
ubl.z_values[i][j] += z_tmp - lsf_results.D; z_values[i][j] += z_tmp - lsf_results.D;
} }
} }
@ -1699,4 +1697,58 @@
#endif #endif
} }
#if ENABLED(UBL_G29_P31)
void unified_bed_leveling::smart_fill_wlsf(const float &weight_factor) {
// For each undefined mesh point, compute a distance-weighted least squares fit
// from all the originally populated mesh points, weighted toward the point
// being extrapolated so that nearby points will have greater influence on
// the point being extrapolated. Then extrapolate the mesh point from WLSF.
static_assert(GRID_MAX_POINTS_Y <= 16, "GRID_MAX_POINTS_Y too big");
uint16_t bitmap[GRID_MAX_POINTS_X] = { 0 };
struct linear_fit_data lsf_results;
SERIAL_ECHOPGM("Extrapolating mesh...");
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++)
if (!isnan(z_values[jx][jy]))
SBI(bitmap[jx], jy);
for (uint8_t ix = 0; ix < GRID_MAX_POINTS_X; ix++) {
const float px = mesh_index_to_xpos(ix);
for (uint8_t iy = 0; iy < GRID_MAX_POINTS_Y; iy++) {
const float py = mesh_index_to_ypos(iy);
if (isnan(z_values[ix][iy])) {
// undefined mesh point at (px,py), compute weighted LSF from original valid mesh points.
incremental_LSF_reset(&lsf_results);
for (uint8_t jx = 0; jx < GRID_MAX_POINTS_X; jx++) {
const float rx = mesh_index_to_xpos(jx);
for (uint8_t jy = 0; jy < GRID_MAX_POINTS_Y; jy++) {
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));
incremental_WLSF(&lsf_results, rx, ry, rz, w);
}
}
}
if (finish_incremental_LSF(&lsf_results)) {
SERIAL_ECHOLNPGM("Insufficient data");
return;
}
const float ez = -lsf_results.D - lsf_results.A * px - lsf_results.B * py;
z_values[ix][iy] = ez;
idle(); // housekeeping
}
}
}
SERIAL_ECHOLNPGM("done");
}
#endif // UBL_G29_P31
#endif // AUTO_BED_LEVELING_UBL #endif // AUTO_BED_LEVELING_UBL

@ -26,11 +26,13 @@
#include "Marlin.h" #include "Marlin.h"
#include "ubl.h" #include "ubl.h"
#include "planner.h" #include "planner.h"
#include "stepper.h"
#include <avr/io.h> #include <avr/io.h>
#include <math.h> #include <math.h>
extern float destination[XYZE]; extern float destination[XYZE];
extern void set_current_to_destination(); extern void set_current_to_destination();
extern float delta_segments_per_second;
static void debug_echo_axis(const AxisEnum axis) { static void debug_echo_axis(const AxisEnum axis) {
if (current_position[axis] == destination[axis]) if (current_position[axis] == destination[axis])
@ -53,12 +55,8 @@
dy = current_position[Y_AXIS] - destination[Y_AXIS], dy = current_position[Y_AXIS] - destination[Y_AXIS],
xy_dist = HYPOT(dx, dy); xy_dist = HYPOT(dx, dy);
if (xy_dist == 0.0) { if (xy_dist == 0.0)
return; return;
//SERIAL_ECHOPGM(" FPMM=");
//const float fpmm = de / xy_dist;
//SERIAL_PROTOCOL_F(fpmm, 6);
}
else { else {
SERIAL_ECHOPGM(" fpmm="); SERIAL_ECHOPGM(" fpmm=");
const float fpmm = de / xy_dist; const float fpmm = de / xy_dist;
@ -87,7 +85,7 @@
} }
void ubl_line_to_destination(const float &feed_rate, uint8_t extruder) { void unified_bed_leveling::line_to_destination_cartesian(const float &feed_rate, uint8_t extruder) {
/** /**
* Much of the nozzle movement will be within the same cell. So we will do as little computation * Much of the nozzle movement will be within the same cell. So we will do as little computation
* as possible to determine if this is the case. If this move is within the same cell, we will * as possible to determine if this is the case. If this move is within the same cell, we will
@ -106,19 +104,19 @@
destination[E_AXIS] destination[E_AXIS]
}; };
const int cell_start_xi = ubl.get_cell_index_x(RAW_X_POSITION(start[X_AXIS])), const int cell_start_xi = get_cell_index_x(RAW_X_POSITION(start[X_AXIS])),
cell_start_yi = ubl.get_cell_index_y(RAW_Y_POSITION(start[Y_AXIS])), cell_start_yi = get_cell_index_y(RAW_Y_POSITION(start[Y_AXIS])),
cell_dest_xi = ubl.get_cell_index_x(RAW_X_POSITION(end[X_AXIS])), cell_dest_xi = get_cell_index_x(RAW_X_POSITION(end[X_AXIS])),
cell_dest_yi = ubl.get_cell_index_y(RAW_Y_POSITION(end[Y_AXIS])); cell_dest_yi = get_cell_index_y(RAW_Y_POSITION(end[Y_AXIS]));
if (ubl.g26_debug_flag) { if (g26_debug_flag) {
SERIAL_ECHOPAIR(" ubl_line_to_destination(xe=", end[X_AXIS]); SERIAL_ECHOPAIR(" ubl.line_to_destination(xe=", end[X_AXIS]);
SERIAL_ECHOPAIR(", ye=", end[Y_AXIS]); SERIAL_ECHOPAIR(", ye=", end[Y_AXIS]);
SERIAL_ECHOPAIR(", ze=", end[Z_AXIS]); SERIAL_ECHOPAIR(", ze=", end[Z_AXIS]);
SERIAL_ECHOPAIR(", ee=", end[E_AXIS]); SERIAL_ECHOPAIR(", ee=", end[E_AXIS]);
SERIAL_CHAR(')'); SERIAL_CHAR(')');
SERIAL_EOL; SERIAL_EOL;
debug_current_and_destination(PSTR("Start of ubl_line_to_destination()")); debug_current_and_destination(PSTR("Start of ubl.line_to_destination()"));
} }
if (cell_start_xi == cell_dest_xi && cell_start_yi == cell_dest_yi) { // if the whole move is within the same cell, if (cell_start_xi == cell_dest_xi && cell_start_yi == cell_dest_yi) { // if the whole move is within the same cell,
@ -134,11 +132,11 @@
// Note: There is no Z Correction in this case. We are off the grid and don't know what // Note: There is no Z Correction in this case. We are off the grid and don't know what
// a reasonable correction would be. // a reasonable correction would be.
planner.buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + ubl.state.z_offset, end[E_AXIS], feed_rate, extruder); planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + state.z_offset, end[E_AXIS], feed_rate, extruder);
set_current_to_destination(); set_current_to_destination();
if (ubl.g26_debug_flag) if (g26_debug_flag)
debug_current_and_destination(PSTR("out of bounds in ubl_line_to_destination()")); debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()"));
return; return;
} }
@ -154,20 +152,20 @@
* to create a 1-over number for us. That will allow us to do a floating point multiply instead of a floating point divide. * 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 = (RAW_X_POSITION(end[X_AXIS]) - pgm_read_float(&ubl.mesh_index_to_xpos[cell_dest_xi])) * (1.0 / (MESH_X_DIST)), const float xratio = (RAW_X_POSITION(end[X_AXIS]) - mesh_index_to_xpos(cell_dest_xi)) * (1.0 / (MESH_X_DIST)),
z1 = ubl.z_values[cell_dest_xi ][cell_dest_yi ] + xratio * z1 = z_values[cell_dest_xi ][cell_dest_yi ] + xratio *
(ubl.z_values[cell_dest_xi + 1][cell_dest_yi ] - ubl.z_values[cell_dest_xi][cell_dest_yi ]), (z_values[cell_dest_xi + 1][cell_dest_yi ] - z_values[cell_dest_xi][cell_dest_yi ]),
z2 = ubl.z_values[cell_dest_xi ][cell_dest_yi + 1] + xratio * z2 = z_values[cell_dest_xi ][cell_dest_yi + 1] + xratio *
(ubl.z_values[cell_dest_xi + 1][cell_dest_yi + 1] - ubl.z_values[cell_dest_xi][cell_dest_yi + 1]); (z_values[cell_dest_xi + 1][cell_dest_yi + 1] - z_values[cell_dest_xi][cell_dest_yi + 1]);
// we are done with the fractional X distance into the cell. Now with the two Z-Heights we have calculated, we // 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. // are going to apply the Y-Distance into the cell to interpolate the final Z correction.
const float yratio = (RAW_Y_POSITION(end[Y_AXIS]) - pgm_read_float(&ubl.mesh_index_to_ypos[cell_dest_yi])) * (1.0 / (MESH_Y_DIST)); const float yratio = (RAW_Y_POSITION(end[Y_AXIS]) - mesh_index_to_ypos(cell_dest_yi)) * (1.0 / (MESH_Y_DIST));
float z0 = z1 + (z2 - z1) * yratio; float z0 = z1 + (z2 - z1) * yratio;
z0 *= ubl.fade_scaling_factor_for_z(end[Z_AXIS]); z0 *= fade_scaling_factor_for_z(end[Z_AXIS]);
/** /**
* If part of the Mesh is undefined, it will show up as NAN * If part of the Mesh is undefined, it will show up as NAN
@ -178,10 +176,10 @@
*/ */
if (isnan(z0)) z0 = 0.0; if (isnan(z0)) z0 = 0.0;
planner.buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0 + ubl.state.z_offset, end[E_AXIS], feed_rate, extruder); planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0 + state.z_offset, end[E_AXIS], feed_rate, extruder);
if (ubl.g26_debug_flag) if (g26_debug_flag)
debug_current_and_destination(PSTR("FINAL_MOVE in ubl_line_to_destination()")); debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
set_current_to_destination(); set_current_to_destination();
return; return;
@ -231,8 +229,8 @@
const float m = dy / dx, const float m = dy / dx,
c = start[Y_AXIS] - m * start[X_AXIS]; c = start[Y_AXIS] - m * start[X_AXIS];
const bool inf_normalized_flag = isinf(e_normalized_dist), const bool inf_normalized_flag = (isinf(e_normalized_dist) != 0),
inf_m_flag = isinf(m); inf_m_flag = (isinf(m) != 0);
/** /**
* This block handles vertical lines. These are lines that stay within the same * 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 * X Cell column. They do not need to be perfectly vertical. They just can
@ -242,7 +240,7 @@
current_yi += down_flag; // Line is heading down, we just want to go to the bottom current_yi += down_flag; // Line is heading down, we just want to go to the bottom
while (current_yi != cell_dest_yi + down_flag) { while (current_yi != cell_dest_yi + down_flag) {
current_yi += dyi; current_yi += dyi;
const float next_mesh_line_y = LOGICAL_Y_POSITION(pgm_read_float(&ubl.mesh_index_to_ypos[current_yi])); const float next_mesh_line_y = LOGICAL_Y_POSITION(mesh_index_to_ypos(current_yi));
/** /**
* if the slope of the line is infinite, we won't do the calculations * if the slope of the line is infinite, we won't do the calculations
@ -251,9 +249,9 @@
*/ */
const float x = inf_m_flag ? start[X_AXIS] : (next_mesh_line_y - c) / m; const float x = inf_m_flag ? start[X_AXIS] : (next_mesh_line_y - c) / m;
float z0 = ubl.z_correction_for_x_on_horizontal_mesh_line(x, current_xi, current_yi); float z0 = z_correction_for_x_on_horizontal_mesh_line(x, current_xi, current_yi);
z0 *= ubl.fade_scaling_factor_for_z(end[Z_AXIS]); z0 *= fade_scaling_factor_for_z(end[Z_AXIS]);
/** /**
* If part of the Mesh is undefined, it will show up as NAN * If part of the Mesh is undefined, it will show up as NAN
@ -264,26 +262,17 @@
*/ */
if (isnan(z0)) z0 = 0.0; if (isnan(z0)) z0 = 0.0;
const float y = LOGICAL_Y_POSITION(pgm_read_float(&ubl.mesh_index_to_ypos[current_yi])); const float y = LOGICAL_Y_POSITION(mesh_index_to_ypos(current_yi));
/** /**
* Without this check, it is possible for the algorithm to generate a zero length move in the case * 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 * 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 * happens, it might be best to remove the check and always 'schedule' the move because
* the planner.buffer_line() routine will filter it if that happens. * the planner._buffer_line() routine will filter it if that happens.
*/ */
if (y != start[Y_AXIS]) { if (y != start[Y_AXIS]) {
if (!inf_normalized_flag) { if (!inf_normalized_flag) {
//on_axis_distance = y - start[Y_AXIS];
on_axis_distance = use_x_dist ? x - start[X_AXIS] : y - start[Y_AXIS]; on_axis_distance = use_x_dist ? x - start[X_AXIS] : y - start[Y_AXIS];
//on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS];
//on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS];
//on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS];
//on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS];
e_position = start[E_AXIS] + on_axis_distance * e_normalized_dist; e_position = start[E_AXIS] + on_axis_distance * e_normalized_dist;
z_position = start[Z_AXIS] + on_axis_distance * z_normalized_dist; z_position = start[Z_AXIS] + on_axis_distance * z_normalized_dist;
} }
@ -292,12 +281,12 @@
z_position = end[Z_AXIS]; z_position = end[Z_AXIS];
} }
planner.buffer_line(x, y, z_position + z0 + ubl.state.z_offset, e_position, feed_rate, extruder); planner._buffer_line(x, y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
} //else printf("FIRST MOVE PRUNED "); } //else printf("FIRST MOVE PRUNED ");
} }
if (ubl.g26_debug_flag) if (g26_debug_flag)
debug_current_and_destination(PSTR("vertical move done in ubl_line_to_destination()")); debug_current_and_destination(PSTR("vertical move done in ubl.line_to_destination()"));
// //
// 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. // 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.
@ -322,12 +311,12 @@
// edge of this cell for the first move. // edge of this cell for the first move.
while (current_xi != cell_dest_xi + left_flag) { while (current_xi != cell_dest_xi + left_flag) {
current_xi += dxi; current_xi += dxi;
const float next_mesh_line_x = LOGICAL_X_POSITION(pgm_read_float(&ubl.mesh_index_to_xpos[current_xi])), const float next_mesh_line_x = LOGICAL_X_POSITION(mesh_index_to_xpos(current_xi)),
y = m * next_mesh_line_x + c; // Calculate Y at the next X mesh line y = m * next_mesh_line_x + c; // Calculate Y at the next X mesh line
float z0 = ubl.z_correction_for_y_on_vertical_mesh_line(y, current_xi, current_yi); float z0 = z_correction_for_y_on_vertical_mesh_line(y, current_xi, current_yi);
z0 *= ubl.fade_scaling_factor_for_z(end[Z_AXIS]); z0 *= fade_scaling_factor_for_z(end[Z_AXIS]);
/** /**
* If part of the Mesh is undefined, it will show up as NAN * If part of the Mesh is undefined, it will show up as NAN
@ -338,23 +327,17 @@
*/ */
if (isnan(z0)) z0 = 0.0; if (isnan(z0)) z0 = 0.0;
const float x = LOGICAL_X_POSITION(pgm_read_float(&ubl.mesh_index_to_xpos[current_xi])); const float x = LOGICAL_X_POSITION(mesh_index_to_xpos(current_xi));
/** /**
* Without this check, it is possible for the algorithm to generate a zero length move in the case * 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 * 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 * that happens, it might be best to remove the check and always 'schedule' the move because
* the planner.buffer_line() routine will filter it if that happens. * the planner._buffer_line() routine will filter it if that happens.
*/ */
if (x != start[X_AXIS]) { if (x != start[X_AXIS]) {
if (!inf_normalized_flag) { if (!inf_normalized_flag) {
//on_axis_distance = x - start[X_AXIS];
on_axis_distance = use_x_dist ? x - start[X_AXIS] : y - start[Y_AXIS]; on_axis_distance = use_x_dist ? x - start[X_AXIS] : y - start[Y_AXIS];
//on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS];
//on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS];
e_position = start[E_AXIS] + on_axis_distance * e_normalized_dist; // is based on X or Y because this is a horizontal move e_position = start[E_AXIS] + on_axis_distance * e_normalized_dist; // is based on X or Y because this is a horizontal move
z_position = start[Z_AXIS] + on_axis_distance * z_normalized_dist; z_position = start[Z_AXIS] + on_axis_distance * z_normalized_dist;
} }
@ -363,12 +346,12 @@
z_position = end[Z_AXIS]; z_position = end[Z_AXIS];
} }
planner.buffer_line(x, y, z_position + z0 + ubl.state.z_offset, e_position, feed_rate, extruder); planner._buffer_line(x, y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
} //else printf("FIRST MOVE PRUNED "); } //else printf("FIRST MOVE PRUNED ");
} }
if (ubl.g26_debug_flag) if (g26_debug_flag)
debug_current_and_destination(PSTR("horizontal move done in ubl_line_to_destination()")); debug_current_and_destination(PSTR("horizontal move done in ubl.line_to_destination()"));
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS]) if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
goto FINAL_MOVE; goto FINAL_MOVE;
@ -394,8 +377,8 @@
while (xi_cnt > 0 || yi_cnt > 0) { while (xi_cnt > 0 || yi_cnt > 0) {
const float next_mesh_line_x = LOGICAL_X_POSITION(pgm_read_float(&ubl.mesh_index_to_xpos[current_xi + dxi])), const float next_mesh_line_x = LOGICAL_X_POSITION(mesh_index_to_xpos(current_xi + dxi)),
next_mesh_line_y = LOGICAL_Y_POSITION(pgm_read_float(&ubl.mesh_index_to_ypos[current_yi + dyi])), next_mesh_line_y = LOGICAL_Y_POSITION(mesh_index_to_ypos(current_yi + dyi)),
y = m * next_mesh_line_x + c, // Calculate Y at the next X mesh line y = m * next_mesh_line_x + c, // Calculate Y at the next X mesh line
x = (next_mesh_line_y - c) / m; // Calculate X at the next Y mesh line x = (next_mesh_line_y - c) / m; // Calculate X at the next Y mesh line
// (No need to worry about m being zero. // (No need to worry about m being zero.
@ -403,12 +386,10 @@
// as a vertical line move above.) // as a vertical line move above.)
if (left_flag == (x > next_mesh_line_x)) { // Check if we hit the Y line first if (left_flag == (x > next_mesh_line_x)) { // Check if we hit the Y line first
//
// Yes! Crossing a Y Mesh Line next // Yes! Crossing a Y Mesh Line next
// float z0 = z_correction_for_x_on_horizontal_mesh_line(x, current_xi - left_flag, current_yi + dyi);
float z0 = ubl.z_correction_for_x_on_horizontal_mesh_line(x, current_xi - left_flag, current_yi + dyi);
z0 *= ubl.fade_scaling_factor_for_z(end[Z_AXIS]); z0 *= fade_scaling_factor_for_z(end[Z_AXIS]);
/** /**
* If part of the Mesh is undefined, it will show up as NAN * If part of the Mesh is undefined, it will show up as NAN
@ -428,17 +409,15 @@
e_position = end[E_AXIS]; e_position = end[E_AXIS];
z_position = end[Z_AXIS]; z_position = end[Z_AXIS];
} }
planner.buffer_line(x, next_mesh_line_y, z_position + z0 + ubl.state.z_offset, e_position, feed_rate, extruder); planner._buffer_line(x, next_mesh_line_y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
current_yi += dyi; current_yi += dyi;
yi_cnt--; yi_cnt--;
} }
else { else {
//
// Yes! Crossing a X Mesh Line next // Yes! Crossing a X Mesh Line next
// float z0 = z_correction_for_y_on_vertical_mesh_line(y, current_xi + dxi, current_yi - down_flag);
float z0 = ubl.z_correction_for_y_on_vertical_mesh_line(y, current_xi + dxi, current_yi - down_flag);
z0 *= ubl.fade_scaling_factor_for_z(end[Z_AXIS]); z0 *= fade_scaling_factor_for_z(end[Z_AXIS]);
/** /**
* If part of the Mesh is undefined, it will show up as NAN * If part of the Mesh is undefined, it will show up as NAN
@ -459,14 +438,16 @@
z_position = end[Z_AXIS]; z_position = end[Z_AXIS];
} }
planner.buffer_line(next_mesh_line_x, y, z_position + z0 + ubl.state.z_offset, e_position, feed_rate, extruder); planner._buffer_line(next_mesh_line_x, y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
current_xi += dxi; current_xi += dxi;
xi_cnt--; 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 (ubl.g26_debug_flag) if (g26_debug_flag)
debug_current_and_destination(PSTR("generic move done in ubl_line_to_destination()")); debug_current_and_destination(PSTR("generic move done in ubl.line_to_destination()"));
if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS]) if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
goto FINAL_MOVE; goto FINAL_MOVE;
@ -474,4 +455,237 @@
set_current_to_destination(); set_current_to_destination();
} }
#if UBL_DELTA
// macro to inline copy exactly 4 floats, don't rely on sizeof operator
#define COPY_XYZE( target, source ) { \
target[X_AXIS] = source[X_AXIS]; \
target[Y_AXIS] = source[Y_AXIS]; \
target[Z_AXIS] = source[Z_AXIS]; \
target[E_AXIS] = source[E_AXIS]; \
}
#if IS_SCARA // scale the feed rate from mm/s to degrees/s
static float scara_feed_factor, scara_oldA, scara_oldB;
#endif
// We don't want additional apply_leveling() performed by regular buffer_line or buffer_line_kinematic,
// so we call _buffer_line directly here. Per-segmented leveling performed first.
static inline void ubl_buffer_line_segment(const float ltarget[XYZE], const float &fr_mm_s, const uint8_t extruder) {
#if IS_KINEMATIC
inverse_kinematics(ltarget); // this writes delta[ABC] from ltarget[XYZ] but does not modify ltarget
float feedrate = fr_mm_s;
#if IS_SCARA // scale the feed rate from mm/s to degrees/s
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];
feedrate = max(adiff, bdiff) * scara_feed_factor;
#endif #endif
planner._buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], ltarget[E_AXIS], feedrate, extruder);
#else // cartesian
planner._buffer_line(ltarget[X_AXIS], ltarget[Y_AXIS], ltarget[Z_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
#endif
}
/**
* Prepare a linear move for DELTA/SCARA/CARTESIAN with UBL and FADE semantics.
* This calls planner._buffer_line multiple times for small incremental moves.
* Returns true if the caller did NOT update current_position, otherwise false.
*/
static bool unified_bed_leveling::prepare_linear_move_to(const float ltarget[XYZE], const float &feedrate) {
if (!position_is_reachable_xy(ltarget[X_AXIS], ltarget[Y_AXIS])) // fail if moving outside reachable boundary
return true; // did not move, so current_position still accurate
const float difference[XYZE] = { // cartesian distances moved in XYZE
ltarget[X_AXIS] - current_position[X_AXIS],
ltarget[Y_AXIS] - current_position[Y_AXIS],
ltarget[Z_AXIS] - current_position[Z_AXIS],
ltarget[E_AXIS] - current_position[E_AXIS]
};
const float cartesian_xy_mm = HYPOT(difference[X_AXIS], difference[Y_AXIS]); // total horizontal xy distance
#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
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
#endif
NOLESS(segments, 1); // must have at least one segment
const float inv_segments = 1.0 / 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);
#endif
const float segment_distance[XYZE] = { // length for each segment
difference[X_AXIS] * inv_segments,
difference[Y_AXIS] * inv_segments,
difference[Z_AXIS] * inv_segments,
difference[E_AXIS] * inv_segments
};
// Note that E segment distance could vary slightly as z mesh height
// changes for each segment, but small enough to ignore.
const bool above_fade_height = (
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
planner.z_fade_height != 0 && planner.z_fade_height < RAW_Z_POSITION(ltarget[Z_AXIS])
#else
false
#endif
);
// Only compute leveling per segment if ubl active and target below z_fade_height.
if (!state.active || above_fade_height) { // no mesh leveling
const float z_offset = state.active ? state.z_offset : 0.0;
float seg_dest[XYZE]; // per-segment destination,
COPY_XYZE(seg_dest, current_position); // starting from current position
while (--segments) {
LOOP_XYZE(i) seg_dest[i] += segment_distance[i];
float ztemp = seg_dest[Z_AXIS];
seg_dest[Z_AXIS] += z_offset;
ubl_buffer_line_segment(seg_dest, feedrate, active_extruder);
seg_dest[Z_AXIS] = ztemp;
}
// Since repeated adding segment_distance accumulates small errors, final move to exact destination.
COPY_XYZE(seg_dest, ltarget);
seg_dest[Z_AXIS] += z_offset;
ubl_buffer_line_segment(seg_dest, feedrate, active_extruder);
return false; // moved but did not set_current_to_destination();
}
// Otherwise perform per-segment leveling
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
const float fade_scaling_factor = fade_scaling_factor_for_z(ltarget[Z_AXIS]);
#endif
float seg_dest[XYZE]; // per-segment destination, initialize to first segment
LOOP_XYZE(i) seg_dest[i] = current_position[i] + segment_distance[i];
const float &dx_seg = segment_distance[X_AXIS]; // alias for clarity
const float &dy_seg = segment_distance[Y_AXIS];
float rx = RAW_X_POSITION(seg_dest[X_AXIS]), // assume raw vs logical coordinates shifted but not scaled.
ry = RAW_Y_POSITION(seg_dest[Y_AXIS]);
for(;;) { // for each mesh cell encountered during the move
// Compute mesh cell invariants that remain constant for all segments within cell.
// Note for cell index, if point is outside the mesh grid (in MESH_INSET perimeter)
// the bilinear interpolation from the adjacent cell within the mesh will still work.
// Inner loop will exit each time (because out of cell bounds) but will come back
// 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 = (rx - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST)),
cell_yi = (ry - (UBL_MESH_MIN_Y)) * (1.0 / (MESH_X_DIST));
cell_xi = constrain(cell_xi, 0, (GRID_MAX_POINTS_X) - 1);
cell_yi = constrain(cell_yi, 0, (GRID_MAX_POINTS_Y) - 1);
const float x0 = mesh_index_to_xpos(cell_xi), // 64 byte table lookup avoids mul+add
y0 = mesh_index_to_ypos(cell_yi), // 64 byte table lookup avoids mul+add
x1 = mesh_index_to_xpos(cell_xi + 1), // 64 byte table lookup avoids mul+add
y1 = mesh_index_to_ypos(cell_yi + 1); // 64 byte table lookup avoids mul+add
float cx = rx - x0, // cell-relative x
cy = ry - y0, // cell-relative y
z_x0y0 = z_values[cell_xi ][cell_yi ], // z at lower left corner
z_x1y0 = z_values[cell_xi+1][cell_yi ], // z at upper left corner
z_x0y1 = z_values[cell_xi ][cell_yi+1], // z at lower right corner
z_x1y1 = z_values[cell_xi+1][cell_yi+1]; // z at upper right corner
if (isnan(z_x0y0)) z_x0y0 = 0; // ideally activating state.active (G29 A)
if (isnan(z_x1y0)) z_x1y0 = 0; // should refuse if any invalid mesh points
if (isnan(z_x0y1)) z_x0y1 = 0; // in order to avoid isnan tests per cell,
if (isnan(z_x1y1)) z_x1y1 = 0; // thus guessing zero for undefined points
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)
float z_cxy0 = z_x0y0 + z_xmy0 * cx; // z height along y0 at cx
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
// float z_cxcy = z_cxy0 + z_cxym * cy; // interpolated mesh z height along cx at cy (do inside the segment loop)
// As subsequent segments step through this cell, the z_cxy0 intercept will change
// and the z_cxym slope will change, both as a function of cx within the cell, and
// each change by a constant for fixed segment lengths.
const float z_sxy0 = z_xmy0 * dx_seg, // per-segment adjustment to z_cxy0
z_sxym = (z_xmy1 - z_xmy0) * (1.0 / (MESH_Y_DIST)) * dx_seg; // per-segment adjustment to z_cxym
for(;;) { // for all segments within this mesh cell
float z_cxcy = z_cxy0 + z_cxym * cy; // interpolated mesh z height along cx at cy
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
z_cxcy *= fade_scaling_factor; // apply fade factor to interpolated mesh height
#endif
z_cxcy += state.z_offset; // add fixed mesh offset from G29 Z
if (--segments == 0) { // if this is last segment, use ltarget for exact
COPY_XYZE(seg_dest, ltarget);
seg_dest[Z_AXIS] += z_cxcy;
ubl_buffer_line_segment(seg_dest, feedrate, active_extruder);
return false; // did not set_current_to_destination()
}
const float z_orig = seg_dest[Z_AXIS]; // remember the pre-leveled segment z value
seg_dest[Z_AXIS] = z_orig + z_cxcy; // adjust segment z height per mesh leveling
ubl_buffer_line_segment(seg_dest, feedrate, active_extruder);
seg_dest[Z_AXIS] = z_orig; // restore pre-leveled z before incrementing
LOOP_XYZE(i) seg_dest[i] += segment_distance[i]; // adjust seg_dest for next segment
cx += dx_seg;
cy += dy_seg;
if (!WITHIN(cx, 0, MESH_X_DIST) || !WITHIN(cy, 0, MESH_Y_DIST)) { // done within this cell, break to next
rx = RAW_X_POSITION(seg_dest[X_AXIS]);
ry = RAW_Y_POSITION(seg_dest[Y_AXIS]);
break;
}
// Next segment still within same mesh cell, adjust the per-segment
// slope and intercept to compute next z height.
z_cxy0 += z_sxy0; // adjust z_cxy0 by per-segment z_sxy0
z_cxym += z_sxym; // adjust z_cxym by per-segment z_sxym
} // segment loop
} // cell loop
}
#endif // UBL_DELTA
#endif // AUTO_BED_LEVELING_UBL

@ -60,6 +60,9 @@ int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2
uint8_t lcd_status_message_level; uint8_t lcd_status_message_level;
char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1 char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1
#if ENABLED(STATUS_MESSAGE_SCROLLING)
uint8_t status_scroll_pos = 0;
#endif
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
#include "ultralcd_impl_DOGM.h" #include "ultralcd_impl_DOGM.h"
@ -78,9 +81,6 @@ uint16_t max_display_update_time = 0;
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
bool drawing_screen = false; bool drawing_screen = false;
#define LCDVIEW_KEEP_REDRAWING LCDVIEW_CALL_REDRAW_NEXT
#else
#define LCDVIEW_KEEP_REDRAWING LCDVIEW_REDRAW_NOW
#endif #endif
#if ENABLED(DAC_STEPPER_CURRENT) #if ENABLED(DAC_STEPPER_CURRENT)
@ -98,7 +98,7 @@ uint16_t max_display_update_time = 0;
typedef void (*screenFunc_t)(); typedef void (*screenFunc_t)();
#if HAS_POWER_SWITCH #if HAS_POWER_SWITCH
extern bool powersupply; extern bool powersupply_on;
#endif #endif
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
@ -129,16 +129,16 @@ uint16_t max_display_update_time = 0;
void lcd_info_menu(); void lcd_info_menu();
#endif // LCD_INFO_MENU #endif // LCD_INFO_MENU
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_filament_change_toocold_menu(); void lcd_advanced_pause_toocold_menu();
void lcd_filament_change_option_menu(); void lcd_advanced_pause_option_menu();
void lcd_filament_change_init_message(); void lcd_advanced_pause_init_message();
void lcd_filament_change_unload_message(); void lcd_advanced_pause_unload_message();
void lcd_filament_change_insert_message(); void lcd_advanced_pause_insert_message();
void lcd_filament_change_load_message(); void lcd_advanced_pause_load_message();
void lcd_filament_change_heat_nozzle(); void lcd_advanced_pause_heat_nozzle();
void lcd_filament_change_extrude_message(); void lcd_advanced_pause_extrude_message();
void lcd_filament_change_resume_message(); void lcd_advanced_pause_resume_message();
#endif #endif
#if ENABLED(DAC_STEPPER_CURRENT) #if ENABLED(DAC_STEPPER_CURRENT)
@ -148,10 +148,6 @@ uint16_t max_display_update_time = 0;
void lcd_dac_write_eeprom(); void lcd_dac_write_eeprom();
#endif #endif
#if HAS_LCD_CONTRAST
void lcd_set_contrast();
#endif
#if ENABLED(FWRETRACT) #if ENABLED(FWRETRACT)
void lcd_control_retract_menu(); void lcd_control_retract_menu();
#endif #endif
@ -181,7 +177,7 @@ uint16_t max_display_update_time = 0;
void menu_edit_callback_ ## _name(); \ void menu_edit_callback_ ## _name(); \
void _menu_action_setting_edit_ ## _name(const char * const pstr, _type* const ptr, const _type minValue, const _type maxValue); \ void _menu_action_setting_edit_ ## _name(const char * const pstr, _type* const ptr, const _type minValue, const _type maxValue); \
void menu_action_setting_edit_ ## _name(const char * const pstr, _type * const ptr, const _type minValue, const _type maxValue); \ void menu_action_setting_edit_ ## _name(const char * const pstr, _type * const ptr, const _type minValue, const _type maxValue); \
void menu_action_setting_edit_callback_ ## _name(const char * const pstr, _type * const ptr, const _type minValue, const _type maxValue, const screenFunc_t callback); \ void menu_action_setting_edit_callback_ ## _name(const char * const pstr, _type * const ptr, const _type minValue, const _type maxValue, const screenFunc_t callback, const bool live=false); \
typedef void _name##_void typedef void _name##_void
DECLARE_MENU_EDIT_TYPE(int, int3); DECLARE_MENU_EDIT_TYPE(int, int3);
@ -240,23 +236,23 @@ uint16_t max_display_update_time = 0;
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) * menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
* *
*/ */
#define _MENU_ITEM_PART_1(TYPE, LABEL, ...) \ #define _MENU_ITEM_PART_1(TYPE, ...) \
if (_menuLineNr == _thisItemNr) { \ if (_menuLineNr == _thisItemNr) { \
if (lcdDrawUpdate) \
lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
if (lcd_clicked && encoderLine == _thisItemNr) { if (lcd_clicked && encoderLine == _thisItemNr) {
#define _MENU_ITEM_PART_2(TYPE, ...) \ #define _MENU_ITEM_PART_2(TYPE, LABEL, ...) \
menu_action_ ## TYPE(__VA_ARGS__); \ menu_action_ ## TYPE(__VA_ARGS__); \
if (screen_changed) return; \ if (screen_changed) return; \
} \ } \
if (lcdDrawUpdate) \
lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
} \ } \
++_thisItemNr ++_thisItemNr
#define MENU_ITEM(TYPE, LABEL, ...) do { \ #define MENU_ITEM(TYPE, LABEL, ...) do { \
_skipStatic = false; \ _skipStatic = false; \
_MENU_ITEM_PART_1(TYPE, LABEL, ## __VA_ARGS__); \ _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
_MENU_ITEM_PART_2(TYPE, ## __VA_ARGS__); \ _MENU_ITEM_PART_2(TYPE, LABEL, ## __VA_ARGS__); \
} while(0) } while(0)
#define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0) #define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
@ -285,10 +281,10 @@ uint16_t max_display_update_time = 0;
* MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
*/ */
#define MENU_MULTIPLIER_ITEM(type, label, ...) do { \ #define MENU_MULTIPLIER_ITEM(type, label, ...) do { \
_MENU_ITEM_PART_1(type, label, ## __VA_ARGS__); \ _MENU_ITEM_PART_1(type, ## __VA_ARGS__); \
encoderRateMultiplierEnabled = true; \ encoderRateMultiplierEnabled = true; \
lastEncoderMovementMillis = 0; \ lastEncoderMovementMillis = 0; \
_MENU_ITEM_PART_2(type, ## __VA_ARGS__); \ _MENU_ITEM_PART_2(type, label, ## __VA_ARGS__); \
} while(0) } while(0)
#else // !ENCODER_RATE_MULTIPLIER #else // !ENCODER_RATE_MULTIPLIER
@ -419,6 +415,7 @@ uint16_t max_display_update_time = 0;
void *editValue; void *editValue;
int32_t minEditValue, maxEditValue; int32_t minEditValue, maxEditValue;
screenFunc_t callbackFunc; screenFunc_t callbackFunc;
bool liveEdit;
// Manual Moves // Manual Moves
const float manual_feedrate_mm_m[] = MANUAL_FEEDRATE; const float manual_feedrate_mm_m[] = MANUAL_FEEDRATE;
@ -482,26 +479,37 @@ uint16_t max_display_update_time = 0;
} }
/** /**
* Synchronize safely while holding the current screen * Show "Moving..." till moves are done, then revert to previous display.
* This blocks all further screen or stripe updates once called
*/ */
extern uint8_t commands_in_queue; static const char moving[] PROGMEM = MSG_MOVING;
static const char *sync_message = moving;
inline void lcd_synchronize() { //
// Display the synchronize screen until moves are
// finished, and don't return to the caller until
// done. ** This blocks the command queue! **
//
void _lcd_synchronize() {
static bool no_reentry = false; static bool no_reentry = false;
lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_MOVING)); if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, sync_message);
if (no_reentry) return; if (no_reentry) return;
// Make this the current handler till all moves are done
no_reentry = true; no_reentry = true;
screenFunc_t old_screen = currentScreen; screenFunc_t old_screen = currentScreen;
lcd_goto_screen(lcd_synchronize); lcd_goto_screen(_lcd_synchronize);
while (commands_in_queue) {
idle();
stepper.synchronize(); stepper.synchronize();
}
no_reentry = false; no_reentry = false;
lcd_goto_screen(old_screen); lcd_goto_screen(old_screen);
} }
// Display the synchronize screen with a custom message
// ** This blocks the command queue! **
void lcd_synchronize(const char * const msg=NULL) {
sync_message = msg ? msg : moving;
_lcd_synchronize();
}
void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); } void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); }
void lcd_save_previous_screen() { void lcd_save_previous_screen() {
@ -573,8 +581,6 @@ void lcd_status_screen() {
#endif #endif
#endif // LCD_PROGRESS_BAR #endif // LCD_PROGRESS_BAR
lcd_implementation_status_screen();
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
if (lcd_clicked) { if (lcd_clicked) {
@ -587,10 +593,11 @@ void lcd_status_screen() {
#endif #endif
); );
lcd_goto_screen(lcd_main_menu); lcd_goto_screen(lcd_main_menu);
return;
} }
#if ENABLED(ULTIPANEL_FEEDMULTIPLY) #if ENABLED(ULTIPANEL_FEEDMULTIPLY)
int new_frm = feedrate_percentage + (int32_t)encoderPosition; const int new_frm = feedrate_percentage + (int32_t)encoderPosition;
// Dead zone at 100% feedrate // Dead zone at 100% feedrate
if ((feedrate_percentage < 100 && new_frm > 100) || (feedrate_percentage > 100 && new_frm < 100)) { if ((feedrate_percentage < 100 && new_frm > 100) || (feedrate_percentage > 100 && new_frm < 100)) {
feedrate_percentage = 100; feedrate_percentage = 100;
@ -615,8 +622,12 @@ void lcd_status_screen() {
feedrate_percentage = constrain(feedrate_percentage, 10, 999); feedrate_percentage = constrain(feedrate_percentage, 10, 999);
#endif // ULTIPANEL #endif // ULTIPANEL
lcd_implementation_status_screen();
} }
void lcd_reset_status() { lcd_setstatusPGM(PSTR(""), -1); }
/** /**
* *
* draw the kill screen * draw the kill screen
@ -624,7 +635,7 @@ void lcd_status_screen() {
*/ */
void kill_screen(const char* lcd_msg) { void kill_screen(const char* lcd_msg) {
lcd_init(); lcd_init();
lcd_setalertstatuspgm(lcd_msg); lcd_setalertstatusPGM(lcd_msg);
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
u8g.firstPage(); u8g.firstPage();
do { do {
@ -686,6 +697,7 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(PARK_HEAD_ON_PAUSE) #if ENABLED(PARK_HEAD_ON_PAUSE)
enqueue_and_echo_commands_P(PSTR("M125")); enqueue_and_echo_commands_P(PSTR("M125"));
#endif #endif
lcd_setstatusPGM(PSTR(MSG_PRINT_PAUSED), -1);
} }
void lcd_sdcard_resume() { void lcd_sdcard_resume() {
@ -695,6 +707,7 @@ void kill_screen(const char* lcd_msg) {
card.startFileprint(); card.startFileprint();
print_job_timer.start(); print_job_timer.start();
#endif #endif
lcd_reset_status();
} }
void lcd_sdcard_stop() { void lcd_sdcard_stop() {
@ -707,24 +720,12 @@ void kill_screen(const char* lcd_msg) {
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
#endif #endif
wait_for_heatup = false; wait_for_heatup = false;
LCD_MESSAGEPGM(MSG_PRINT_ABORTED); lcd_setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1);
lcd_return_to_status();
} }
#endif // SDSUPPORT #endif // SDSUPPORT
#if ENABLED(MENU_ITEM_CASE_LIGHT)
extern bool case_light_on;
extern void update_case_light();
void toggle_case_light() {
case_light_on ^= true;
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
update_case_light();
}
#endif // MENU_ITEM_CASE_LIGHT
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
/** /**
@ -788,16 +789,77 @@ void kill_screen(const char* lcd_msg) {
#endif // HAS_DEBUG_MENU #endif // HAS_DEBUG_MENU
#if ENABLED(CUSTOM_USER_MENUS)
#ifdef USER_SCRIPT_DONE
#define _DONE_SCRIPT "\n" USER_SCRIPT_DONE
#else
#define _DONE_SCRIPT ""
#endif
void _lcd_user_gcode(const char * const cmd) {
lcd_return_to_status();
enqueue_and_echo_commands_P(cmd);
}
#if defined(USER_DESC_1) && defined(USER_GCODE_1)
void lcd_user_gcode_1() { _lcd_user_gcode(PSTR(USER_GCODE_1 _DONE_SCRIPT)); }
#endif
#if defined(USER_DESC_2) && defined(USER_GCODE_2)
void lcd_user_gcode_2() { _lcd_user_gcode(PSTR(USER_GCODE_2 _DONE_SCRIPT)); }
#endif
#if defined(USER_DESC_3) && defined(USER_GCODE_3)
void lcd_user_gcode_3() { _lcd_user_gcode(PSTR(USER_GCODE_3 _DONE_SCRIPT)); }
#endif
#if defined(USER_DESC_4) && defined(USER_GCODE_4)
void lcd_user_gcode_4() { _lcd_user_gcode(PSTR(USER_GCODE_4 _DONE_SCRIPT)); }
#endif
#if defined(USER_DESC_5) && defined(USER_GCODE_5)
void lcd_user_gcode_5() { _lcd_user_gcode(PSTR(USER_GCODE_5 _DONE_SCRIPT)); }
#endif
void _lcd_user_menu() {
START_MENU();
MENU_BACK(MSG_MAIN);
#if defined(USER_DESC_1) && defined(USER_GCODE_1)
MENU_ITEM(function, USER_DESC_1, lcd_user_gcode_1);
#endif
#if defined(USER_DESC_2) && defined(USER_GCODE_2)
MENU_ITEM(function, USER_DESC_2, lcd_user_gcode_2);
#endif
#if defined(USER_DESC_3) && defined(USER_GCODE_3)
MENU_ITEM(function, USER_DESC_3, lcd_user_gcode_3);
#endif
#if defined(USER_DESC_4) && defined(USER_GCODE_4)
MENU_ITEM(function, USER_DESC_4, lcd_user_gcode_4);
#endif
#if defined(USER_DESC_5) && defined(USER_GCODE_5)
MENU_ITEM(function, USER_DESC_5, lcd_user_gcode_5);
#endif
END_MENU();
}
#endif
/** /**
* *
* "Main" menu * "Main" menu
* *
*/ */
#if ENABLED(MENU_ITEM_CASE_LIGHT)
extern bool case_light_on;
extern void update_case_light();
#endif
void lcd_main_menu() { void lcd_main_menu() {
START_MENU(); START_MENU();
MENU_BACK(MSG_WATCH); MENU_BACK(MSG_WATCH);
#if ENABLED(CUSTOM_USER_MENUS)
MENU_ITEM(submenu, MSG_USER_MENU, _lcd_user_menu);
#endif
// //
// Debug Menu when certain options are enabled // Debug Menu when certain options are enabled
// //
@ -809,14 +871,7 @@ void kill_screen(const char* lcd_msg) {
// Switch case light on/off // Switch case light on/off
// //
#if ENABLED(MENU_ITEM_CASE_LIGHT) #if ENABLED(MENU_ITEM_CASE_LIGHT)
if (case_light_on) MENU_ITEM_EDIT_CALLBACK(bool, MSG_CASE_LIGHT, &case_light_on, update_case_light);
MENU_ITEM(function, MSG_LIGHTS_OFF, toggle_case_light);
else
MENU_ITEM(function, MSG_LIGHTS_ON, toggle_case_light);
#endif
#if ENABLED(BLTOUCH)
MENU_ITEM(submenu, MSG_BLTOUCH, bltouch_menu);
#endif #endif
if (planner.movesplanned() || IS_SD_PRINTING) { if (planner.movesplanned() || IS_SD_PRINTING) {
@ -919,7 +974,7 @@ void kill_screen(const char* lcd_msg) {
zprobe_zoffset = new_zoffset; zprobe_zoffset = new_zoffset;
refresh_zprobe_zoffset(true); refresh_zprobe_zoffset(true);
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
} }
} }
if (lcdDrawUpdate) if (lcdDrawUpdate)
@ -950,7 +1005,7 @@ void kill_screen(const char* lcd_msg) {
mesh_edit_accumulator += float(ubl_encoderPosition) * 0.005 / 2.0; mesh_edit_accumulator += float(ubl_encoderPosition) * 0.005 / 2.0;
mesh_edit_value = mesh_edit_accumulator; mesh_edit_value = mesh_edit_accumulator;
encoderPosition = 0; encoderPosition = 0;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
const int32_t rounded = (int32_t)(mesh_edit_value * 1000.0); const int32_t rounded = (int32_t)(mesh_edit_value * 1000.0);
mesh_edit_value = float(rounded - (rounded % 5L)) / 1000.0; mesh_edit_value = float(rounded - (rounded % 5L)) / 1000.0;
@ -964,10 +1019,6 @@ void kill_screen(const char* lcd_msg) {
defer_return_to_status = true; defer_return_to_status = true;
} }
void _lcd_mesh_edit() {
_lcd_mesh_fine_tune(PSTR("Mesh Editor"));
}
float lcd_mesh_edit() { float lcd_mesh_edit() {
lcd_goto_screen(_lcd_mesh_edit_NOP); lcd_goto_screen(_lcd_mesh_edit_NOP);
_lcd_mesh_fine_tune(PSTR("Mesh Editor")); _lcd_mesh_fine_tune(PSTR("Mesh Editor"));
@ -1024,15 +1075,15 @@ void kill_screen(const char* lcd_msg) {
void watch_temp_callback_bed() { thermalManager.start_watching_bed(); } void watch_temp_callback_bed() { thermalManager.start_watching_bed(); }
#endif #endif
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_enqueue_filament_change() { void lcd_enqueue_filament_change() {
if (!DEBUGGING(DRYRUN) && thermalManager.tooColdToExtrude(active_extruder)) { if (!DEBUGGING(DRYRUN) && thermalManager.tooColdToExtrude(active_extruder)) {
lcd_save_previous_screen(); lcd_save_previous_screen();
lcd_goto_screen(lcd_filament_change_toocold_menu); lcd_goto_screen(lcd_advanced_pause_toocold_menu);
return; return;
} }
lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INIT); lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT);
enqueue_and_echo_commands_P(PSTR("M600")); enqueue_and_echo_commands_P(PSTR("M600 B0"));
} }
#endif #endif
@ -1147,7 +1198,7 @@ void kill_screen(const char* lcd_msg) {
// //
// Change filament // Change filament
// //
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
if (!thermalManager.tooColdToExtrude(active_extruder)) if (!thermalManager.tooColdToExtrude(active_extruder))
MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_enqueue_filament_change); MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_enqueue_filament_change);
#endif #endif
@ -1293,7 +1344,7 @@ void kill_screen(const char* lcd_msg) {
void lcd_preheat_m2_bedonly() { _lcd_preheat(0, 0, lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); } void lcd_preheat_m2_bedonly() { _lcd_preheat(0, 0, lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); }
#endif #endif
#if TEMP_SENSOR_0 != 0 && (TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0) #if TEMP_SENSOR_0 != 0 && (TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_BED != 0)
void lcd_preheat_m1_menu() { void lcd_preheat_m1_menu() {
START_MENU(); START_MENU();
@ -1399,7 +1450,7 @@ void kill_screen(const char* lcd_msg) {
END_MENU(); END_MENU();
} }
#endif // TEMP_SENSOR_0 && (TEMP_SENSOR_1 || TEMP_SENSOR_2 || TEMP_SENSOR_3 || TEMP_SENSOR_BED) #endif // TEMP_SENSOR_0 && (TEMP_SENSOR_1 || TEMP_SENSOR_2 || TEMP_SENSOR_3 || TEMP_SENSOR_4 || TEMP_SENSOR_BED)
void lcd_cooldown() { void lcd_cooldown() {
#if FAN_COUNT > 0 #if FAN_COUNT > 0
@ -1419,6 +1470,11 @@ void kill_screen(const char* lcd_msg) {
#endif #endif
#if ENABLED(EEPROM_SETTINGS)
static void lcd_store_settings() { lcd_completion_feedback(settings.save()); }
static void lcd_load_settings() { lcd_completion_feedback(settings.load()); }
#endif
#if ENABLED(LCD_BED_LEVELING) #if ENABLED(LCD_BED_LEVELING)
/** /**
@ -1429,22 +1485,34 @@ void kill_screen(const char* lcd_msg) {
static uint8_t manual_probe_index; static uint8_t manual_probe_index;
#if ENABLED(PROBE_MANUALLY) // LCD probed points are from defaults
extern bool g29_in_progress; constexpr uint8_t total_probe_points = (
#if ENABLED(AUTO_BED_LEVELING_3POINT)
3
#elif ABL_GRID || ENABLED(MESH_BED_LEVELING)
GRID_MAX_POINTS
#endif #endif
);
// LCD probed points are from defaults //
constexpr uint8_t total_probe_points = // Raise Z to the "manual probe height"
#if ABL_GRID // Don't return until done.
(GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y) // ** This blocks the command queue! **
#elif ENABLED(AUTO_BED_LEVELING_3POINT) //
int(3) void _lcd_after_probing() {
#elif ENABLED(AUTO_BED_LEVELING_UBL) #if MANUAL_PROBE_HEIGHT > 0
(GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y) current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
#elif ENABLED(MESH_BED_LEVELING) line_to_current(Z_AXIS);
(GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y)
#endif #endif
; // Display "Done" screen and wait for moves to complete
#if MANUAL_PROBE_HEIGHT > 0 || ENABLED(MESH_BED_LEVELING)
lcd_synchronize(PSTR(MSG_LEVEL_BED_DONE));
#endif
lcd_goto_previous_menu();
lcd_completion_feedback();
defer_return_to_status = false;
//LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE);
}
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
@ -1458,34 +1526,30 @@ void kill_screen(const char* lcd_msg) {
current_position[Y_AXIS] = LOGICAL_Y_POSITION(y); current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder); planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
#if MANUAL_PROBE_HEIGHT > 0 #if MANUAL_PROBE_HEIGHT > 0
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + 0.2; current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
line_to_current(Z_AXIS); line_to_current(Z_AXIS);
#endif #endif
lcd_synchronize(); lcd_synchronize();
} }
#endif // MESH_BED_LEVELING #elif ENABLED(PROBE_MANUALLY)
#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY) bool lcd_wait_for_move;
void _lcd_level_goto_next_point();
#endif
//
// Bed leveling is done. Wait for G29 to complete.
// A flag is used so that this can release control
// and allow the command queue to be processed.
//
void _lcd_level_bed_done() { void _lcd_level_bed_done() {
if (!lcd_wait_for_move) _lcd_after_probing();
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_DONE)); if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_DONE));
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
} }
/** #endif
* Step 6: Display "Next point: 1 / 9" while waiting for move to finish
*/ void _lcd_level_goto_next_point();
void _lcd_level_bed_moving() {
if (lcdDrawUpdate) {
char msg[10];
sprintf_P(msg, PSTR("%i / %u"), (int)(manual_probe_index + 1), total_probe_points);
lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg);
}
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING;
}
/** /**
* Step 7: Get the Z coordinate, click goes to the next point or exits * Step 7: Get the Z coordinate, click goes to the next point or exits
@ -1493,192 +1557,574 @@ void kill_screen(const char* lcd_msg) {
void _lcd_level_bed_get_z() { void _lcd_level_bed_get_z() {
ENCODER_DIRECTION_NORMAL(); ENCODER_DIRECTION_NORMAL();
// Encoder wheel adjusts the Z position if (lcd_clicked) {
//
// Save the current Z position
//
#if ENABLED(MESH_BED_LEVELING)
//
// MBL records the position but doesn't move to the next one
//
mbl.set_zigzag_z(manual_probe_index, current_position[Z_AXIS]);
#endif
// If done...
if (++manual_probe_index >= total_probe_points) {
#if ENABLED(PROBE_MANUALLY)
//
// The last G29 will record and enable but not move.
// Since G29 is deferred,
//
lcd_wait_for_move = true;
enqueue_and_echo_commands_P(PSTR("G29 V1"));
lcd_goto_screen(_lcd_level_bed_done);
#elif ENABLED(MESH_BED_LEVELING)
_lcd_after_probing();
mbl.set_has_mesh(true);
mesh_probing_done();
#endif
}
else {
// MESH_BED_LEVELING: Z already stored, just move
// PROBE_MANUALLY: Send G29 to record Z, then move
_lcd_level_goto_next_point();
}
return;
}
//
// Encoder knob or keypad buttons adjust the Z position
//
if (encoderPosition) { if (encoderPosition) {
refresh_cmd_timeout(); refresh_cmd_timeout();
current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP); current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP);
NOLESS(current_position[Z_AXIS], -(LCD_PROBE_Z_RANGE) * 0.5); NOLESS(current_position[Z_AXIS], -(LCD_PROBE_Z_RANGE) * 0.5);
NOMORE(current_position[Z_AXIS], (LCD_PROBE_Z_RANGE) * 0.5); NOMORE(current_position[Z_AXIS], (LCD_PROBE_Z_RANGE) * 0.5);
line_to_current(Z_AXIS); line_to_current(Z_AXIS);
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
encoderPosition = 0; encoderPosition = 0;
} }
if (lcd_clicked) { //
// Draw on first display, then only on Z change
//
if (lcdDrawUpdate) {
const float v = current_position[Z_AXIS];
lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001 : 0.0001), '+'));
}
}
// Use a hook to set the probe point z /**
// (zigzag arranges in XY order) * Step 6: Display "Next point: 1 / 9" while waiting for move to finish
#if ENABLED(AUTO_BED_LEVELING_UBL) */
// UBL set-z handling goes here void _lcd_level_bed_moving() {
if (lcdDrawUpdate) {
char msg[10];
sprintf_P(msg, PSTR("%i / %u"), (int)(manual_probe_index + 1), total_probe_points);
lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg);
}
lcdDrawUpdate = LCDVIEW_CALL_NO_REDRAW;
#if ENABLED(PROBE_MANUALLY)
if (!lcd_wait_for_move) lcd_goto_screen(_lcd_level_bed_get_z);
#endif
}
#elif ENABLED(PROBE_MANUALLY) /**
* Step 5: Initiate a move to the next point
*/
void _lcd_level_goto_next_point() {
// G29 helpfully records Z and goes to the next // Set the menu to display ahead of blocking call
// point (or beeps if done) lcd_goto_screen(_lcd_level_bed_moving);
enqueue_and_echo_commands_P(PSTR("G29"));
manual_probe_index++;
#elif ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
mbl.set_zigzag_z(manual_probe_index++, current_position[Z_AXIS]); int8_t px, py;
mbl.zigzag(manual_probe_index, px, py);
#endif // Controls the loop until the move is done
_manual_probe_goto_xy(
LOGICAL_X_POSITION(mbl.index_to_xpos[px]),
LOGICAL_Y_POSITION(mbl.index_to_ypos[py])
);
// If done... // After the blocking function returns, change menus
if (manual_probe_index == total_probe_points) { lcd_goto_screen(_lcd_level_bed_get_z);
// Say "Done!" #elif ENABLED(PROBE_MANUALLY)
lcd_goto_screen(_lcd_level_bed_done);
// G29 Records Z, moves, and signals when it pauses
lcd_wait_for_move = true;
enqueue_and_echo_commands_P(PSTR("G29 V1"));
// Raise Z to the "manual probe height"
#if MANUAL_PROBE_HEIGHT > 0
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
line_to_current(Z_AXIS);
lcd_synchronize();
#endif #endif
}
// Enable leveling, if needed /**
#if ENABLED(MESH_BED_LEVELING) * Step 4: Display "Click to Begin", wait for click
* Move to the first probe position
*/
void _lcd_level_bed_homing_done() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
if (lcd_clicked) {
manual_probe_index = 0;
_lcd_level_goto_next_point();
}
}
lcd_synchronize(); /**
mbl.set_has_mesh(true); * Step 3: Display "Homing XYZ" - Wait for homing to finish
mesh_probing_done(); */
void _lcd_level_bed_homing() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_HOMING), NULL);
lcdDrawUpdate = LCDVIEW_CALL_NO_REDRAW;
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
lcd_goto_screen(_lcd_level_bed_homing_done);
}
#elif ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(PROBE_MANUALLY)
extern bool g29_in_progress;
#endif
// UBL enable goes here /**
* Step 2: Continue Bed Leveling...
*/
void _lcd_level_bed_continue() {
defer_return_to_status = true;
axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false;
lcd_goto_screen(_lcd_level_bed_homing);
enqueue_and_echo_commands_P(PSTR("G28"));
}
#elif ENABLED(PROBE_MANUALLY) static bool _level_state;
void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(_level_state); }
void _lcd_set_z_fade_height() { set_z_fade_height(planner.z_fade_height); }
/**
* Step 1: Bed Level entry-point
* - Cancel
* - Auto Home (if homing needed)
* - Leveling On/Off (if data exists, and homed)
* - Level Bed >
* - Fade Height (Req: ENABLE_LEVELING_FADE_HEIGHT)
* - Mesh Z Offset (Req: MESH_BED_LEVELING)
* - Z Probe Offset (Req: HAS_BED_PROBE, Opt: BABYSTEP_ZPROBE_OFFSET)
* - Load Settings (Req: EEPROM_SETTINGS)
* - Save Settings (Req: EEPROM_SETTINGS)
*/
void lcd_bed_leveling() {
START_MENU();
MENU_BACK(MSG_PREPARE);
// ABL will be enabled due to "G29". if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]))
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
else if (leveling_is_valid()) {
_level_state = leveling_is_active();
MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &_level_state, _lcd_toggle_bed_leveling);
}
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
set_z_fade_height(planner.z_fade_height);
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &planner.z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height);
#endif #endif
lcd_return_to_status(); //
//LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE); // MBL Z Offset
lcd_completion_feedback(); //
} #if ENABLED(MESH_BED_LEVELING)
else { MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
#endif
// Move to the next probe point, if needed #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY) MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE
MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, lcd_refresh_zprobe_zoffset);
#endif
_lcd_level_goto_next_point(); MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue);
#if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings);
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
#endif
END_MENU();
}
#elif ENABLED(AUTO_BED_LEVELING_UBL) #elif ENABLED(AUTO_BED_LEVELING_UBL)
// UBL goto-next-point goes here void _lcd_ubl_level_bed();
static int ubl_storage_slot = 0,
custom_bed_temp = 50,
custom_hotend_temp = 190,
side_points = 3,
ubl_fillin_amount = 5,
ubl_height_amount,
map_type;
/**
* UBL Build Custom Mesh Command
*/
void _lcd_ubl_build_custom_mesh() {
char UBL_LCD_GCODE[20];
enqueue_and_echo_commands_P(PSTR("G28"));
#if WATCH_THE_BED
sprintf_P(UBL_LCD_GCODE, PSTR("M190 S%i"), custom_bed_temp);
enqueue_and_echo_command(UBL_LCD_GCODE);
#endif #endif
} sprintf_P(UBL_LCD_GCODE, PSTR("M109 S%i"), custom_hotend_temp);
enqueue_and_echo_command(UBL_LCD_GCODE);
enqueue_and_echo_commands_P(PSTR("G29 P1"));
} }
// Update on first display, then only on updates to Z position /**
// Show message above on clicks instead * UBL Custom Mesh submenu
if (lcdDrawUpdate) { */
const float v = current_position[Z_AXIS]; void _lcd_ubl_custom_mesh() {
lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001 : 0.0001), '+')); START_MENU();
} MENU_BACK(MSG_UBL_BUILD_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_HOTEND_TEMP, &custom_hotend_temp, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP - 10));
#if WATCH_THE_BED
MENU_ITEM_EDIT(int3, MSG_UBL_CUSTOM_BED_TEMP, &custom_bed_temp, BED_MINTEMP, (BED_MAXTEMP - 5));
#endif
MENU_ITEM(function, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_build_custom_mesh);
END_MENU();
} }
#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY) /**
* UBL Adjust Mesh Height Command
*/
void _lcd_ubl_adjust_height_cmd() {
char UBL_LCD_GCODE[16];
const int ind = ubl_height_amount < 0 ? 6 : 7;
strcpy_P(UBL_LCD_GCODE, PSTR("G29 P6-"));
sprintf_P(&UBL_LCD_GCODE[ind], PSTR(".%i"), abs(ubl_height_amount));
enqueue_and_echo_command(UBL_LCD_GCODE);
}
/** /**
* Step 5: Initiate a move to the next point * UBL Adjust Mesh Height submenu
*/ */
void _lcd_level_goto_next_point() { void _lcd_ubl_height_adjust_menu() {
START_MENU();
MENU_BACK(MSG_UBL_EDIT_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_MESH_HEIGHT_AMOUNT, &ubl_height_amount, -9, 9);
MENU_ITEM(function, MSG_UBL_MESH_HEIGHT_ADJUST, _lcd_ubl_adjust_height_cmd);
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
// Set the menu to display ahead of blocking call /**
lcd_goto_screen(_lcd_level_bed_moving); * UBL Edit Mesh submenu
*/
void _lcd_ubl_edit_mesh() {
START_MENU();
MENU_BACK(MSG_UBL_TOOLS);
MENU_BACK(MSG_UBL_LEVEL_BED);
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R T"));
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_CLOSEST, PSTR("G29 P4 T"));
MENU_ITEM(submenu, MSG_UBL_MESH_HEIGHT_ADJUST, _lcd_ubl_height_adjust_menu);
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
#if ENABLED(MESH_BED_LEVELING) /**
* UBL Validate Custom Mesh Command
*/
void _lcd_ubl_validate_custom_mesh() {
char UBL_LCD_GCODE[24];
const int temp =
#if WATCH_THE_BED
custom_bed_temp
#else
0
#endif
;
sprintf_P(UBL_LCD_GCODE, PSTR("G28\nG26 C B%i H%i P"), temp, custom_hotend_temp);
enqueue_and_echo_command(UBL_LCD_GCODE);
}
int8_t px, py; /**
mbl.zigzag(manual_probe_index, px, py); * UBL Validate Mesh submenu
*/
void _lcd_ubl_validate_mesh() {
START_MENU();
MENU_BACK(MSG_UBL_TOOLS);
#if WATCH_THE_BED
MENU_ITEM(gcode, MSG_UBL_VALIDATE_PLA_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_1_TEMP_BED) " H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P"));
MENU_ITEM(gcode, MSG_UBL_VALIDATE_ABS_MESH, PSTR("G28\nG26 C B" STRINGIFY(PREHEAT_2_TEMP_BED) " H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
#else
MENU_ITEM(gcode, MSG_UBL_VALIDATE_PLA_MESH, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_1_TEMP_HOTEND) " P"));
MENU_ITEM(gcode, MSG_UBL_VALIDATE_ABS_MESH, PSTR("G28\nG26 C B0 H" STRINGIFY(PREHEAT_2_TEMP_HOTEND) " P"));
#endif
MENU_ITEM(function, MSG_UBL_VALIDATE_CUSTOM_MESH, _lcd_ubl_validate_custom_mesh);
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
// Controls the loop until the move is done /**
_manual_probe_goto_xy( * UBL Grid Leveling Command
LOGICAL_X_POSITION(mbl.index_to_xpos[px]), */
LOGICAL_Y_POSITION(mbl.index_to_ypos[py]) void _lcd_ubl_grid_level_cmd() {
); char UBL_LCD_GCODE[10];
sprintf_P(UBL_LCD_GCODE, PSTR("G29 J%i"), side_points);
enqueue_and_echo_command(UBL_LCD_GCODE);
}
#elif ENABLED(AUTO_BED_LEVELING_UBL) /**
* UBL Grid Leveling submenu
*/
void _lcd_ubl_grid_level() {
START_MENU();
MENU_BACK(MSG_UBL_TOOLS);
MENU_ITEM_EDIT(int3, MSG_UBL_SIDE_POINTS, &side_points, 2, 6);
MENU_ITEM(function, MSG_UBL_MESH_LEVEL, _lcd_ubl_grid_level_cmd);
END_MENU();
}
// UBL may have its own methodology /**
* UBL Mesh Leveling submenu
*/
void _lcd_ubl_mesh_leveling() {
START_MENU();
MENU_BACK(MSG_UBL_TOOLS);
MENU_ITEM(gcode, MSG_UBL_3POINT_MESH_LEVELING, PSTR("G29 J0"));
MENU_ITEM(submenu, MSG_UBL_GRID_MESH_LEVELING, _lcd_ubl_grid_level);
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
#elif ENABLED(PROBE_MANUALLY) /**
* UBL Fill-in Amount Mesh Command
*/
void _lcd_ubl_fillin_amount_cmd() {
char UBL_LCD_GCODE[16];
sprintf_P(UBL_LCD_GCODE, PSTR("G29 P3 R C.%i"), ubl_fillin_amount);
enqueue_and_echo_command(UBL_LCD_GCODE);
}
// Just wait for the G29 move to complete /**
lcd_synchronize(); * UBL Smart Fill-in Command
*/
void _lcd_ubl_smart_fillin_cmd() {
char UBL_LCD_GCODE[12];
sprintf_P(UBL_LCD_GCODE, PSTR("G29 P3 T%i"), map_type);
enqueue_and_echo_command(UBL_LCD_GCODE);
}
#endif /**
* UBL Fill-in Mesh submenu
*/
void _lcd_ubl_fillin_menu() {
START_MENU();
MENU_BACK(MSG_UBL_BUILD_MESH_MENU);
MENU_ITEM_EDIT(int3, MSG_UBL_FILLIN_AMOUNT, &ubl_fillin_amount, 0, 9);
MENU_ITEM(function, MSG_UBL_FILLIN_MESH, _lcd_ubl_fillin_amount_cmd);
MENU_ITEM(function, MSG_UBL_SMART_FILLIN, _lcd_ubl_smart_fillin_cmd);
MENU_ITEM(gcode, MSG_UBL_MANUAL_FILLIN, PSTR("G29 P2 B T0"));
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
// After the blocking function returns, change menus void _lcd_ubl_invalidate() {
lcd_goto_screen(_lcd_level_bed_get_z); ubl.invalidate();
SERIAL_PROTOCOLLNPGM("Mesh invalidated.");
} }
#endif // MESH_BED_LEVELING /**
* UBL Build Mesh submenu
*/
void _lcd_ubl_build_mesh() {
START_MENU();
MENU_BACK(MSG_UBL_TOOLS);
#if WATCH_THE_BED
MENU_ITEM(gcode, MSG_UBL_BUILD_PLA_MESH, PSTR(
"G28\n"
"M190 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\n"
"M109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\n"
"G29 P1\n"
"M104 S0\n"
"M140 S0"
));
MENU_ITEM(gcode, MSG_UBL_BUILD_ABS_MESH, PSTR(
"G28\n"
"M190 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\n"
"M109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\n"
"G29 P1\n"
"M104 S0\n"
"M140 S0"
));
#else
MENU_ITEM(gcode, MSG_UBL_BUILD_PLA_MESH, PSTR(
"G28\n"
"M109 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) "\n"
"G29 P1\n"
"M104 S0"
));
MENU_ITEM(gcode, MSG_UBL_BUILD_ABS_MESH, PSTR(
"G28\n"
"M109 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) "\n"
"G29 P1\n"
"M104 S0"
));
#endif
MENU_ITEM(submenu, MSG_UBL_BUILD_CUSTOM_MESH, _lcd_ubl_custom_mesh);
MENU_ITEM(gcode, MSG_UBL_BUILD_COLD_MESH, PSTR("G28\nG29 P1"));
MENU_ITEM(submenu, MSG_UBL_FILLIN_MESH, _lcd_ubl_fillin_menu);
MENU_ITEM(gcode, MSG_UBL_CONTINUE_MESH, PSTR("G29 P1 C"));
MENU_ITEM(function, MSG_UBL_INVALIDATE_ALL, _lcd_ubl_invalidate);
MENU_ITEM(gcode, MSG_UBL_INVALIDATE_CLOSEST, PSTR("G29 I"));
MENU_ITEM(function, MSG_WATCH, lcd_return_to_status);
END_MENU();
}
/** /**
* Step 4: Display "Click to Begin", wait for click * UBL Load Mesh Command
* Move to the first probe position
*/ */
void _lcd_level_bed_homing_done() { void _lcd_ubl_load_mesh_cmd() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING)); char UBL_LCD_GCODE[8];
if (lcd_clicked) { sprintf_P(UBL_LCD_GCODE, PSTR("G29 L%i"), ubl_storage_slot);
manual_probe_index = 0; enqueue_and_echo_command(UBL_LCD_GCODE);
#if ENABLED(MESH_BED_LEVELING)
_lcd_level_goto_next_point();
#elif ENABLED(AUTO_BED_LEVELING_UBL)
// UBL click handling should go here
#elif ENABLED(PROBE_MANUALLY)
enqueue_and_echo_commands_P(PSTR("G29"));
_lcd_level_goto_next_point();
#endif
} }
/**
* UBL Save Mesh Command
*/
void _lcd_ubl_save_mesh_cmd() {
char UBL_LCD_GCODE[8];
sprintf_P(UBL_LCD_GCODE, PSTR("G29 S%i"), ubl_storage_slot);
enqueue_and_echo_command(UBL_LCD_GCODE);
} }
/** /**
* Step 3: Display "Homing XYZ" - Wait for homing to finish * UBL Mesh Storage submenu
*/ */
void _lcd_level_bed_homing() { void _lcd_ubl_storage_mesh() {
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_HOMING), NULL); START_MENU();
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) MENU_BACK(MSG_UBL_LEVEL_BED);
lcd_goto_screen(_lcd_level_bed_homing_done); MENU_ITEM_EDIT(int3, MSG_UBL_STORAGE_SLOT, &ubl_storage_slot, 0, 9);
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING; MENU_ITEM(function, MSG_UBL_LOAD_MESH, _lcd_ubl_load_mesh_cmd);
MENU_ITEM(function, MSG_UBL_SAVE_MESH, _lcd_ubl_save_mesh_cmd);
END_MENU();
} }
#endif // LCD_BED_LEVELING /**
* UBL Output map Command
*/
void _lcd_ubl_output_map_cmd() {
char UBL_LCD_GCODE[10];
sprintf_P(UBL_LCD_GCODE, PSTR("G29 T%i"), map_type);
enqueue_and_echo_command(UBL_LCD_GCODE);
}
#if ENABLED(LCD_BED_LEVELING) || HAS_ABL /**
* UBL Output map submenu
*/
void _lcd_ubl_output_map() {
START_MENU();
MENU_BACK(MSG_UBL_LEVEL_BED);
MENU_ITEM_EDIT(int3, MSG_UBL_MAP_TYPE, &map_type, 0, 1);
if (map_type == 0) MENU_ITEM(function, MSG_UBL_OUTPUT_MAP_HOST, _lcd_ubl_output_map_cmd);
if (map_type == 1) MENU_ITEM(function, MSG_UBL_OUTPUT_MAP_CSV, _lcd_ubl_output_map_cmd);
END_MENU();
}
/** /**
* Step 2: Continue Bed Leveling... * UBL Tools submenu
*/ */
void _lcd_level_bed_continue() { void _lcd_ubl_tools_menu() {
#if ENABLED(LCD_BED_LEVELING) START_MENU();
defer_return_to_status = true; MENU_BACK(MSG_UBL_LEVEL_BED);
axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false; MENU_ITEM(submenu, MSG_UBL_BUILD_MESH_MENU, _lcd_ubl_build_mesh);
lcd_goto_screen(_lcd_level_bed_homing); MENU_ITEM(submenu, MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh);
enqueue_and_echo_commands_P(PSTR("G28")); MENU_ITEM(submenu, MSG_UBL_EDIT_MESH_MENU, _lcd_ubl_edit_mesh);
#else MENU_ITEM(submenu, MSG_UBL_MESH_LEVELING, _lcd_ubl_mesh_leveling);
lcd_return_to_status(); END_MENU();
enqueue_and_echo_commands_P(axis_homed[X_AXIS] && axis_homed[Y_AXIS] ? PSTR("G29") : PSTR("G28\nG29"));
#endif
} }
/** /**
* Step 1: Bed Level entry-point: "Cancel" or "Level Bed" * UBL System submenu
*
* Prepare
* - Unified Bed Leveling
* - Activate UBL
* - Deactivate UBL
* - Mesh Storage
* Memory Slot:
* Load Bed Mesh
* Save Bed Mesh
* - Output Map
* Map Type:
* Output Bed Mesh Host / Output Bed Mesh CSV
* - UBL Tools
* - Build Mesh
* Build PLA Mesh
* Build ABS Mesh
* - Build Custom Mesh
* Hotend Temp:
* Bed Temp:
* Build Custom Mesh
* Info Screen
* - Build Cold Mesh
* - Fill-in Mesh
* Fill-in Mesh
* Smart Fill-in
* Manual Fill-in
* Info Screen
* Continue Bed Mesh
* Invalidate All
* Invalidate Closest
* - Validate Mesh
* PLA Mesh Validation
* ABS Mesh Validation
* - Custom Mesh Validation
* Hotend Temp:
* Bed Temp:
* Validate Mesh
* Info Screen
* - Edit Mesh
* Fine Tune All
* Fine Tune Closest
* - Adjust Mesh Height
* Height Amount:
* Adjust Mesh Height
* Info Screen
* - Mesh Leveling
* 3-Point Mesh Leveling
* - Grid Mesh Leveling
* Side points:
* Level Mesh
* Info Screen
* - Output UBL Info
*/ */
void lcd_level_bed() {
void _lcd_ubl_level_bed() {
START_MENU(); START_MENU();
MENU_BACK(MSG_LEVEL_BED_CANCEL); MENU_BACK(MSG_PREPARE);
MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue); MENU_ITEM(gcode, MSG_UBL_ACTIVATE_MESH, PSTR("G29 A"));
MENU_ITEM(gcode, MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D"));
MENU_ITEM(submenu, MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh);
MENU_ITEM(submenu, MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map);
MENU_ITEM(submenu, MSG_UBL_TOOLS, _lcd_ubl_tools_menu);
MENU_ITEM(gcode, MSG_UBL_INFO_UBL, PSTR("G29 W"));
END_MENU(); END_MENU();
} }
#endif // LCD_BED_LEVELING || HAS_ABL #endif // AUTO_BED_LEVELING_UBL
/** /**
* *
@ -1715,13 +2161,13 @@ void kill_screen(const char* lcd_msg) {
// //
// Level Bed // Level Bed
// //
#if ENABLED(LCD_BED_LEVELING) || HAS_ABL #if ENABLED(AUTO_BED_LEVELING_UBL)
MENU_ITEM(submenu, MSG_UBL_LEVEL_BED, _lcd_ubl_level_bed);
#elif ENABLED(LCD_BED_LEVELING)
#if ENABLED(PROBE_MANUALLY) #if ENABLED(PROBE_MANUALLY)
if (!g29_in_progress) if (!g29_in_progress)
#endif #endif
MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed); MENU_ITEM(submenu, MSG_BED_LEVELING, lcd_bed_leveling);
#endif #endif
#if HAS_M206_COMMAND #if HAS_M206_COMMAND
@ -1737,20 +2183,16 @@ void kill_screen(const char* lcd_msg) {
// //
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
//
// Preheat PLA
// Preheat ABS
//
#if TEMP_SENSOR_0 != 0
// //
// Change filament // Change filament
// //
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
if (!thermalManager.tooColdToExtrude(active_extruder)) if (!thermalManager.tooColdToExtrude(active_extruder))
MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_enqueue_filament_change); MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_enqueue_filament_change);
#endif #endif
#if TEMP_SENSOR_0 != 0
// //
// Cooldown // Cooldown
// //
@ -1764,7 +2206,7 @@ void kill_screen(const char* lcd_msg) {
// //
// Preheat for Material 1 and 2 // Preheat for Material 1 and 2
// //
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_BED != 0
MENU_ITEM(submenu, MSG_PREHEAT_1, lcd_preheat_m1_menu); MENU_ITEM(submenu, MSG_PREHEAT_1, lcd_preheat_m1_menu);
MENU_ITEM(submenu, MSG_PREHEAT_2, lcd_preheat_m2_menu); MENU_ITEM(submenu, MSG_PREHEAT_2, lcd_preheat_m2_menu);
#else #else
@ -1787,7 +2229,7 @@ void kill_screen(const char* lcd_msg) {
// Switch power on/off // Switch power on/off
// //
#if HAS_POWER_SWITCH #if HAS_POWER_SWITCH
if (powersupply) if (powersupply_on)
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81")); MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
else else
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80")); MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
@ -1812,12 +2254,16 @@ void kill_screen(const char* lcd_msg) {
void _lcd_calibrate_homing() { void _lcd_calibrate_homing() {
if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_LEVEL_BED_HOMING)); if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_LEVEL_BED_HOMING));
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING; lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
lcd_goto_previous_menu(); lcd_goto_previous_menu();
} }
void _lcd_delta_calibrate_home() { void _lcd_delta_calibrate_home() {
#if HAS_LEVELING
reset_bed_level(); // After calibration bed-level data is no longer valid
#endif
enqueue_and_echo_commands_P(PSTR("G28")); enqueue_and_echo_commands_P(PSTR("G28"));
lcd_goto_screen(_lcd_calibrate_homing); lcd_goto_screen(_lcd_calibrate_homing);
} }
@ -1825,6 +2271,10 @@ void kill_screen(const char* lcd_msg) {
// Move directly to the tower position with uninterpolated moves // Move directly to the tower position with uninterpolated moves
// If we used interpolated moves it would cause this to become re-entrant // If we used interpolated moves it would cause this to become re-entrant
void _goto_tower_pos(const float &a) { void _goto_tower_pos(const float &a) {
#if HAS_LEVELING
reset_bed_level(); // After calibration bed-level data is no longer valid
#endif
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5; current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
line_to_current(Z_AXIS); line_to_current(Z_AXIS);
@ -2124,10 +2574,16 @@ void kill_screen(const char* lcd_msg) {
* *
*/ */
#if ENABLED(EEPROM_SETTINGS) /**
static void lcd_store_settings() { lcd_completion_feedback(settings.save()); } *
static void lcd_load_settings() { lcd_completion_feedback(settings.load()); } * Callback for LCD contrast
#endif *
*/
#if HAS_LCD_CONTRAST
void lcd_callback_set_contrast() { set_lcd_contrast(lcd_contrast); }
#endif // HAS_LCD_CONTRAST
static void lcd_factory_settings() { static void lcd_factory_settings() {
settings.reset(); settings.reset();
@ -2142,8 +2598,7 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu); MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu);
#if HAS_LCD_CONTRAST #if HAS_LCD_CONTRAST
//MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast);
#endif #endif
#if ENABLED(FWRETRACT) #if ENABLED(FWRETRACT)
MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu); MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu);
@ -2152,12 +2607,19 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM(submenu, MSG_DRIVE_STRENGTH, lcd_dac_menu); MENU_ITEM(submenu, MSG_DRIVE_STRENGTH, lcd_dac_menu);
#endif #endif
#if ENABLED(BLTOUCH)
MENU_ITEM(submenu, MSG_BLTOUCH, bltouch_menu);
#endif
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings);
#endif #endif
MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings); MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings);
#if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500")); // TODO: Add "Are You Sure?" step
#endif
END_MENU(); END_MENU();
} }
@ -2420,6 +2882,13 @@ void kill_screen(const char* lcd_msg) {
*/ */
void lcd_control_temperature_preheat_material2_settings_menu() { _lcd_control_temperature_preheat_settings_menu(1); } void lcd_control_temperature_preheat_material2_settings_menu() { _lcd_control_temperature_preheat_settings_menu(1); }
/**
*
* "Control" > "Motion" submenu
*
*/
void _reset_acceleration_rates() { planner.reset_acceleration_rates(); } void _reset_acceleration_rates() { planner.reset_acceleration_rates(); }
#if ENABLED(DISTINCT_E_FACTORS) #if ENABLED(DISTINCT_E_FACTORS)
void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) _reset_acceleration_rates(); } void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) _reset_acceleration_rates(); }
@ -2457,40 +2926,16 @@ void kill_screen(const char* lcd_msg) {
#endif // E_STEPPERS > 2 #endif // E_STEPPERS > 2
#endif #endif
/**
*
* "Control" > "Motion" submenu
*
*/
#if HAS_BED_PROBE && DISABLED(BABYSTEP_ZPROBE_OFFSET) #if HAS_BED_PROBE && DISABLED(BABYSTEP_ZPROBE_OFFSET)
static void lcd_refresh_zprobe_zoffset() { refresh_zprobe_zoffset(); } static void lcd_refresh_zprobe_zoffset() { refresh_zprobe_zoffset(); }
#endif #endif
void lcd_control_motion_menu() { // M203 / M205 Velocity options
void lcd_control_motion_velocity_menu() {
START_MENU(); START_MENU();
MENU_BACK(MSG_CONTROL); MENU_BACK(MSG_MOTION);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE
MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, lcd_refresh_zprobe_zoffset);
#endif
// Manual bed leveling, Bed Z:
#if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)
MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
#endif
MENU_ITEM_EDIT(float5, MSG_ACC, &planner.acceleration, 10, 99000);
MENU_ITEM_EDIT(float3, MSG_VX_JERK, &planner.max_jerk[X_AXIS], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VY_JERK, &planner.max_jerk[Y_AXIS], 1, 990);
#if ENABLED(DELTA)
MENU_ITEM_EDIT(float3, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 1, 990);
#else
MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 0.1, 990);
#endif
MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
// // M203 Max Feedrate
// M203 Settings
//
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &planner.max_feedrate_mm_s[X_AXIS], 1, 999); MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &planner.max_feedrate_mm_s[X_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &planner.max_feedrate_mm_s[Y_AXIS], 1, 999); MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &planner.max_feedrate_mm_s[Y_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &planner.max_feedrate_mm_s[Z_AXIS], 1, 999); MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &planner.max_feedrate_mm_s[Z_AXIS], 1, 999);
@ -2512,12 +2957,30 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS], 1, 999); MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS], 1, 999);
#endif #endif
// M205 S Min Feedrate
MENU_ITEM_EDIT(float3, MSG_VMIN, &planner.min_feedrate_mm_s, 0, 999); MENU_ITEM_EDIT(float3, MSG_VMIN, &planner.min_feedrate_mm_s, 0, 999);
// M205 T Min Travel Feedrate
MENU_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.min_travel_feedrate_mm_s, 0, 999); MENU_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.min_travel_feedrate_mm_s, 0, 999);
// END_MENU();
// M201 Settings }
//
// M201 / M204 Accelerations
void lcd_control_motion_acceleration_menu() {
START_MENU();
MENU_BACK(MSG_MOTION);
// M204 P Acceleration
MENU_ITEM_EDIT(float5, MSG_ACC, &planner.acceleration, 10, 99000);
// M204 R Retract Acceleration
MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.retract_acceleration, 100, 99000);
// M204 T Travel Acceleration
MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.travel_acceleration, 100, 99000);
// M201 settings
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_X, &planner.max_acceleration_mm_per_s2[X_AXIS], 100, 99000, _reset_acceleration_rates); MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_X, &planner.max_acceleration_mm_per_s2[X_AXIS], 100, 99000, _reset_acceleration_rates);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Y, &planner.max_acceleration_mm_per_s2[Y_AXIS], 100, 99000, _reset_acceleration_rates); MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Y, &planner.max_acceleration_mm_per_s2[Y_AXIS], 100, 99000, _reset_acceleration_rates);
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &planner.max_acceleration_mm_per_s2[Z_AXIS], 10, 99000, _reset_acceleration_rates); MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &planner.max_acceleration_mm_per_s2[Z_AXIS], 10, 99000, _reset_acceleration_rates);
@ -2539,12 +3002,31 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates); MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
#endif #endif
MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.retract_acceleration, 100, 99000); END_MENU();
MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.travel_acceleration, 100, 99000); }
// M205 Jerk
void lcd_control_motion_jerk_menu() {
START_MENU();
MENU_BACK(MSG_MOTION);
MENU_ITEM_EDIT(float3, MSG_VX_JERK, &planner.max_jerk[X_AXIS], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VY_JERK, &planner.max_jerk[Y_AXIS], 1, 990);
#if ENABLED(DELTA)
MENU_ITEM_EDIT(float3, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 1, 990);
#else
MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 0.1, 990);
#endif
MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
END_MENU();
}
// M92 Steps-per-mm
void lcd_control_motion_steps_per_mm_menu() {
START_MENU();
MENU_BACK(MSG_MOTION);
//
// M92 Settings
//
MENU_ITEM_EDIT_CALLBACK(float62, MSG_XSTEPS, &planner.axis_steps_per_mm[X_AXIS], 5, 9999, _planner_refresh_positioning); MENU_ITEM_EDIT_CALLBACK(float62, MSG_XSTEPS, &planner.axis_steps_per_mm[X_AXIS], 5, 9999, _planner_refresh_positioning);
MENU_ITEM_EDIT_CALLBACK(float62, MSG_YSTEPS, &planner.axis_steps_per_mm[Y_AXIS], 5, 9999, _planner_refresh_positioning); MENU_ITEM_EDIT_CALLBACK(float62, MSG_YSTEPS, &planner.axis_steps_per_mm[Y_AXIS], 5, 9999, _planner_refresh_positioning);
MENU_ITEM_EDIT_CALLBACK(float62, MSG_ZSTEPS, &planner.axis_steps_per_mm[Z_AXIS], 5, 9999, _planner_refresh_positioning); MENU_ITEM_EDIT_CALLBACK(float62, MSG_ZSTEPS, &planner.axis_steps_per_mm[Z_AXIS], 5, 9999, _planner_refresh_positioning);
@ -2566,9 +3048,36 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
#endif #endif
END_MENU();
}
void lcd_control_motion_menu() {
START_MENU();
MENU_BACK(MSG_CONTROL);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
#elif HAS_BED_PROBE
MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, lcd_refresh_zprobe_zoffset);
#endif
// M203 / M205 - Feedrate items
MENU_ITEM(submenu, MSG_VELOCITY, lcd_control_motion_velocity_menu);
// M201 - Acceleration items
MENU_ITEM(submenu, MSG_ACCELERATION, lcd_control_motion_acceleration_menu);
// M205 - Max Jerk
MENU_ITEM(submenu, MSG_JERK, lcd_control_motion_jerk_menu);
// M92 - Steps Per mm
MENU_ITEM(submenu, MSG_STEPS_PER_MM, lcd_control_motion_steps_per_mm_menu);
// M540 S - Abort on endstop hit when SD printing
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &stepper.abort_on_endstop_hit); MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &stepper.abort_on_endstop_hit);
#endif #endif
END_MENU(); END_MENU();
} }
@ -2608,32 +3117,6 @@ void kill_screen(const char* lcd_msg) {
END_MENU(); END_MENU();
} }
/**
*
* "Control" > "Contrast" submenu
*
*/
#if HAS_LCD_CONTRAST
void lcd_set_contrast() {
if (lcd_clicked) { return lcd_goto_previous_menu(); }
ENCODER_DIRECTION_NORMAL();
if (encoderPosition) {
set_lcd_contrast(lcd_contrast + encoderPosition);
encoderPosition = 0;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
}
if (lcdDrawUpdate) {
lcd_implementation_drawedit(PSTR(MSG_CONTRAST),
#if LCD_CONTRAST_MAX >= 100
itostr3(lcd_contrast)
#else
itostr2(lcd_contrast)
#endif
);
}
}
#endif // HAS_LCD_CONTRAST
/** /**
* *
* "Control" > "Retract" submenu * "Control" > "Retract" submenu
@ -2804,6 +3287,15 @@ void kill_screen(const char* lcd_msg) {
STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_3_MAXTEMP), false); STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_3_MAXTEMP), false);
#endif #endif
#if TEMP_SENSOR_4 != 0
#undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_4
#include "thermistornames.h"
STATIC_ITEM("T4: " THERMISTOR_NAME, false, true);
STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_4_MINTEMP), false);
STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_4_MAXTEMP), false);
#endif
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_BED #define THERMISTOR_ID TEMP_SENSOR_BED
@ -2876,7 +3368,7 @@ void kill_screen(const char* lcd_msg) {
* Filament Change Feature Screens * Filament Change Feature Screens
* *
*/ */
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
// Portions from STATIC_ITEM... // Portions from STATIC_ITEM...
#define HOTEND_STATUS_ITEM() do { \ #define HOTEND_STATUS_ITEM() do { \
@ -2889,12 +3381,12 @@ void kill_screen(const char* lcd_msg) {
encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \ encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
++encoderLine; \ ++encoderLine; \
} \ } \
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING; \ lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
} \ } \
++_thisItemNr; \ ++_thisItemNr; \
} while(0) } while(0)
void lcd_filament_change_toocold_menu() { void lcd_advanced_pause_toocold_menu() {
START_MENU(); START_MENU();
STATIC_ITEM(MSG_HEATING_FAILED_LCD, true, true); STATIC_ITEM(MSG_HEATING_FAILED_LCD, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_MINTEMP STRINGIFY(EXTRUDE_MINTEMP) ".", false, false); STATIC_ITEM(MSG_FILAMENT_CHANGE_MINTEMP STRINGIFY(EXTRUDE_MINTEMP) ".", false, false);
@ -2906,25 +3398,25 @@ void kill_screen(const char* lcd_msg) {
END_MENU(); END_MENU();
} }
void lcd_filament_change_resume_print() { void lcd_advanced_pause_resume_print() {
filament_change_menu_response = FILAMENT_CHANGE_RESPONSE_RESUME_PRINT; advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_RESUME_PRINT;
} }
void lcd_filament_change_extrude_more() { void lcd_advanced_pause_extrude_more() {
filament_change_menu_response = FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE; advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE;
} }
void lcd_filament_change_option_menu() { void lcd_advanced_pause_option_menu() {
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER, true, false); STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER, true, false);
#endif #endif
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_filament_change_resume_print); MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_advanced_pause_resume_print);
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_EXTRUDE, lcd_filament_change_extrude_more); MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_EXTRUDE, lcd_advanced_pause_extrude_more);
END_MENU(); END_MENU();
} }
void lcd_filament_change_init_message() { void lcd_advanced_pause_init_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_1);
@ -2947,7 +3439,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_unload_message() { void lcd_advanced_pause_unload_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1);
@ -2970,7 +3462,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_wait_for_nozzles_to_heat() { void lcd_advanced_pause_wait_for_nozzles_to_heat() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEATING_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEATING_1);
@ -2987,7 +3479,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_heat_nozzle() { void lcd_advanced_pause_heat_nozzle() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEAT_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEAT_1);
@ -3004,7 +3496,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_insert_message() { void lcd_advanced_pause_insert_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1);
@ -3027,7 +3519,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_load_message() { void lcd_advanced_pause_load_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1);
@ -3050,7 +3542,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_extrude_message() { void lcd_advanced_pause_extrude_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_1);
@ -3073,7 +3565,7 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_resume_message() { void lcd_advanced_pause_resume_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_1);
@ -3086,44 +3578,52 @@ void kill_screen(const char* lcd_msg) {
END_SCREEN(); END_SCREEN();
} }
void lcd_filament_change_show_message(const FilamentChangeMessage message) { void lcd_advanced_pause_show_message(const AdvancedPauseMessage message) {
switch (message) { switch (message) {
case FILAMENT_CHANGE_MESSAGE_INIT: case ADVANCED_PAUSE_MESSAGE_INIT:
defer_return_to_status = true; defer_return_to_status = true;
lcd_goto_screen(lcd_filament_change_init_message); lcd_goto_screen(lcd_advanced_pause_init_message);
break; break;
case FILAMENT_CHANGE_MESSAGE_UNLOAD: case ADVANCED_PAUSE_MESSAGE_UNLOAD:
lcd_goto_screen(lcd_filament_change_unload_message); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_unload_message);
break; break;
case FILAMENT_CHANGE_MESSAGE_INSERT: case ADVANCED_PAUSE_MESSAGE_INSERT:
lcd_goto_screen(lcd_filament_change_insert_message); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_insert_message);
break; break;
case FILAMENT_CHANGE_MESSAGE_LOAD: case ADVANCED_PAUSE_MESSAGE_LOAD:
lcd_goto_screen(lcd_filament_change_load_message); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_load_message);
break; break;
case FILAMENT_CHANGE_MESSAGE_EXTRUDE: case ADVANCED_PAUSE_MESSAGE_EXTRUDE:
lcd_goto_screen(lcd_filament_change_extrude_message); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_extrude_message);
break; break;
case FILAMENT_CHANGE_MESSAGE_CLICK_TO_HEAT_NOZZLE: case ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE:
lcd_goto_screen(lcd_filament_change_heat_nozzle); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_heat_nozzle);
break; break;
case FILAMENT_CHANGE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT: case ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT:
lcd_goto_screen(lcd_filament_change_wait_for_nozzles_to_heat); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_wait_for_nozzles_to_heat);
break; break;
case FILAMENT_CHANGE_MESSAGE_OPTION: case ADVANCED_PAUSE_MESSAGE_OPTION:
filament_change_menu_response = FILAMENT_CHANGE_RESPONSE_WAIT_FOR; defer_return_to_status = true;
lcd_goto_screen(lcd_filament_change_option_menu); advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR;
lcd_goto_screen(lcd_advanced_pause_option_menu);
break; break;
case FILAMENT_CHANGE_MESSAGE_RESUME: case ADVANCED_PAUSE_MESSAGE_RESUME:
lcd_goto_screen(lcd_filament_change_resume_message); defer_return_to_status = true;
lcd_goto_screen(lcd_advanced_pause_resume_message);
break; break;
case FILAMENT_CHANGE_MESSAGE_STATUS: case ADVANCED_PAUSE_MESSAGE_STATUS:
lcd_return_to_status(); lcd_return_to_status();
break; break;
} }
} }
#endif // FILAMENT_CHANGE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
/** /**
* *
@ -3138,7 +3638,7 @@ void kill_screen(const char* lcd_msg) {
* void menu_edit_callback_int3(); // edit int (interactively) with callback on completion * void menu_edit_callback_int3(); // edit int (interactively) with callback on completion
* void _menu_action_setting_edit_int3(const char * const pstr, int * const ptr, const int minValue, const int maxValue); * void _menu_action_setting_edit_int3(const char * const pstr, int * const ptr, const int minValue, const int maxValue);
* void menu_action_setting_edit_int3(const char * const pstr, int * const ptr, const int minValue, const int maxValue); * void menu_action_setting_edit_int3(const char * const pstr, int * const ptr, const int minValue, const int maxValue);
* void menu_action_setting_edit_callback_int3(const char * const pstr, int * const ptr, const int minValue, const int maxValue, const screenFunc_t callback); // edit int with callback * void menu_action_setting_edit_callback_int3(const char * const pstr, int * const ptr, const int minValue, const int maxValue, const screenFunc_t callback, const bool live); // edit int with callback
* *
* You can then use one of the menu macros to present the edit interface: * You can then use one of the menu macros to present the edit interface:
* MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999) * MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999)
@ -3146,9 +3646,7 @@ void kill_screen(const char* lcd_msg) {
* This expands into a more primitive menu item: * This expands into a more primitive menu item:
* MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) * MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
* *
* * ...which calls:
* Also: MENU_MULTIPLIER_ITEM_EDIT, MENU_ITEM_EDIT_CALLBACK, and MENU_MULTIPLIER_ITEM_EDIT_CALLBACK
*
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) * menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
*/ */
#define DEFINE_MENU_EDIT_TYPE(_type, _name, _strFunc, _scale) \ #define DEFINE_MENU_EDIT_TYPE(_type, _name, _strFunc, _scale) \
@ -3158,11 +3656,11 @@ void kill_screen(const char* lcd_msg) {
if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \ if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \
if (lcdDrawUpdate) \ if (lcdDrawUpdate) \
lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) * (1.0 / _scale))); \ lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) * (1.0 / _scale))); \
if (lcd_clicked) { \ if (lcd_clicked || (liveEdit && lcdDrawUpdate)) { \
_type value = ((_type)((int32_t)encoderPosition + minEditValue)) * (1.0 / _scale); \ _type value = ((_type)((int32_t)encoderPosition + minEditValue)) * (1.0 / _scale); \
if (editValue != NULL) \ if (editValue != NULL) *((_type*)editValue) = value; \
*((_type*)editValue) = value; \ if (liveEdit) (*callbackFunc)(); \
lcd_goto_previous_menu(); \ if (lcd_clicked) lcd_goto_previous_menu(); \
} \ } \
return lcd_clicked; \ return lcd_clicked; \
} \ } \
@ -3183,10 +3681,11 @@ void kill_screen(const char* lcd_msg) {
_menu_action_setting_edit_ ## _name(pstr, ptr, minValue, maxValue); \ _menu_action_setting_edit_ ## _name(pstr, ptr, minValue, maxValue); \
currentScreen = menu_edit_ ## _name; \ currentScreen = menu_edit_ ## _name; \
} \ } \
void menu_action_setting_edit_callback_ ## _name (const char * const pstr, _type * const ptr, const _type minValue, const _type maxValue, const screenFunc_t callback) { \ void menu_action_setting_edit_callback_ ## _name(const char * const pstr, _type * const ptr, const _type minValue, const _type maxValue, const screenFunc_t callback, const bool live) { \
_menu_action_setting_edit_ ## _name(pstr, ptr, minValue, maxValue); \ _menu_action_setting_edit_ ## _name(pstr, ptr, minValue, maxValue); \
currentScreen = menu_edit_callback_ ## _name; \ currentScreen = menu_edit_callback_ ## _name; \
callbackFunc = callback; \ callbackFunc = callback; \
liveEdit = live; \
} \ } \
typedef void _name typedef void _name
@ -3371,7 +3870,7 @@ int lcd_strlen(const char* s) {
#if ENABLED(MAPPER_NON) #if ENABLED(MAPPER_NON)
j++; j++;
#else #else
if ((s[i] & 0xC0u) != 0x80u) j++; if (PRINTABLE(s[i])) j++;
#endif #endif
i++; i++;
} }
@ -3384,7 +3883,7 @@ int lcd_strlen_P(const char* s) {
#if ENABLED(MAPPER_NON) #if ENABLED(MAPPER_NON)
j++; j++;
#else #else
if ((pgm_read_byte(s) & 0xC0u) != 0x80u) j++; if (PRINTABLE(pgm_read_byte(s))) j++;
#endif #endif
s++; s++;
} }
@ -3422,9 +3921,9 @@ bool lcd_blink() {
* - if (lcdDrawUpdate) { redraw } * - if (lcdDrawUpdate) { redraw }
* - Before exiting the handler set lcdDrawUpdate to: * - Before exiting the handler set lcdDrawUpdate to:
* - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT. * - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT.
* - LCDVIEW_REDRAW_NOW or LCDVIEW_NONE to keep drawing, but only in this loop. * - LCDVIEW_REDRAW_NOW to draw now (including remaining stripes).
* - LCDVIEW_CALL_REDRAW_NEXT to keep drawing and draw on the next loop also. * - LCDVIEW_CALL_REDRAW_NEXT to draw now and get LCDVIEW_REDRAW_NOW on the next loop.
* - LCDVIEW_CALL_NO_REDRAW to keep drawing (or start drawing) with no redraw on the next loop. * - LCDVIEW_CALL_NO_REDRAW to draw now and get LCDVIEW_NONE on the next loop.
* - NOTE: For graphical displays menu handlers may be called 2 or more times per loop, * - NOTE: For graphical displays menu handlers may be called 2 or more times per loop,
* so don't change lcdDrawUpdate without considering this. * so don't change lcdDrawUpdate without considering this.
* *
@ -3544,7 +4043,7 @@ void lcd_update() {
encoderDiff = 0; encoderDiff = 0;
} }
return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING; lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
} }
#endif // ULTIPANEL #endif // ULTIPANEL
@ -3645,13 +4144,15 @@ void lcd_update() {
} // ELAPSED(ms, next_lcd_update_ms) } // ELAPSED(ms, next_lcd_update_ms)
} }
#if DISABLED(STATUS_MESSAGE_SCROLLING)
void set_utf_strlen(char* s, uint8_t n) { void set_utf_strlen(char* s, uint8_t n) {
uint8_t i = 0, j = 0; uint8_t i = 0, j = 0;
while (s[i] && (j < n)) { while (s[i] && (j < n)) {
#if ENABLED(MAPPER_NON) #if ENABLED(MAPPER_NON)
j++; j++;
#else #else
if ((s[i] & 0xC0u) != 0x80u) j++; if (PRINTABLE(s[i])) j++;
#endif #endif
i++; i++;
} }
@ -3659,8 +4160,13 @@ void set_utf_strlen(char* s, uint8_t n) {
s[i] = '\0'; s[i] = '\0';
} }
#endif // !STATUS_MESSAGE_SCROLLING
void lcd_finishstatus(bool persist=false) { void lcd_finishstatus(bool persist=false) {
#if DISABLED(STATUS_MESSAGE_SCROLLING)
set_utf_strlen(lcd_status_message, LCD_WIDTH); set_utf_strlen(lcd_status_message, LCD_WIDTH);
#endif
#if !(ENABLED(LCD_PROGRESS_BAR) && (PROGRESS_MSG_EXPIRE > 0)) #if !(ENABLED(LCD_PROGRESS_BAR) && (PROGRESS_MSG_EXPIRE > 0))
UNUSED(persist); UNUSED(persist);
#endif #endif
@ -3676,6 +4182,10 @@ void lcd_finishstatus(bool persist=false) {
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
previous_lcd_status_ms = millis(); //get status message to show up for a while previous_lcd_status_ms = millis(); //get status message to show up for a while
#endif #endif
#if ENABLED(STATUS_MESSAGE_SCROLLING)
status_scroll_pos = 0;
#endif
} }
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0 #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
@ -3690,7 +4200,8 @@ void lcd_setstatus(const char * const message, const bool persist) {
lcd_finishstatus(persist); lcd_finishstatus(persist);
} }
void lcd_setstatuspgm(const char * const message, const uint8_t level) { void lcd_setstatusPGM(const char * const message, int8_t level) {
if (level < 0) level = lcd_status_message_level = 0;
if (level < lcd_status_message_level) return; if (level < lcd_status_message_level) return;
lcd_status_message_level = level; lcd_status_message_level = level;
strncpy_P(lcd_status_message, message, 3 * (LCD_WIDTH)); strncpy_P(lcd_status_message, message, 3 * (LCD_WIDTH));
@ -3707,8 +4218,8 @@ void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) {
lcd_finishstatus(level > 0); lcd_finishstatus(level > 0);
} }
void lcd_setalertstatuspgm(const char * const message) { void lcd_setalertstatusPGM(const char * const message) {
lcd_setstatuspgm(message, 1); lcd_setstatusPGM(message, 1);
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
lcd_return_to_status(); lcd_return_to_status();
#endif #endif
@ -3717,10 +4228,12 @@ void lcd_setalertstatuspgm(const char * const message) {
void lcd_reset_alert_level() { lcd_status_message_level = 0; } void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#if HAS_LCD_CONTRAST #if HAS_LCD_CONTRAST
void set_lcd_contrast(const int value) {
void set_lcd_contrast(const uint16_t value) {
lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX); lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
u8g.setContrast(lcd_contrast); u8g.setContrast(lcd_contrast);
} }
#endif #endif
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -3863,7 +4376,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
if (ubl.has_control_of_lcd_panel) { if (ubl.has_control_of_lcd_panel) {
ubl.encoder_diff = encoderDiff; // Make the encoder's rotation available to G29's Mesh Editor ubl.encoder_diff = encoderDiff; // Make the encoder's rotation available to G29's Mesh Editor
encoderDiff = 0; // We are going to lie to the LCD Panel and claim the encoder encoderDiff = 0; // We are going to lie to the LCD Panel and claim the encoder
// wheel has not turned. // knob has not turned.
} }
#endif #endif
lastEncoderBits = enc; lastEncoderBits = enc;

@ -38,14 +38,17 @@
void lcd_init(); void lcd_init();
bool lcd_hasstatus(); bool lcd_hasstatus();
void lcd_setstatus(const char* message, const bool persist=false); void lcd_setstatus(const char* message, const bool persist=false);
void lcd_setstatuspgm(const char* message, const uint8_t level=0); void lcd_setstatusPGM(const char* message, const int8_t level=0);
void lcd_setalertstatusPGM(const char* message);
void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...); void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...);
void lcd_setalertstatuspgm(const char* message);
void lcd_reset_alert_level(); void lcd_reset_alert_level();
void lcd_kill_screen(); void lcd_kill_screen();
void kill_screen(const char* lcd_msg); void kill_screen(const char* lcd_msg);
bool lcd_detected(void); bool lcd_detected(void);
extern uint8_t lcdDrawUpdate;
inline void lcd_refresh() { lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
#if HAS_BUZZER #if HAS_BUZZER
void lcd_buzz(long duration, uint16_t freq); void lcd_buzz(long duration, uint16_t freq);
#endif #endif
@ -55,15 +58,12 @@
#endif #endif
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
extern int lcd_contrast; extern uint16_t lcd_contrast;
void set_lcd_contrast(int value); void set_lcd_contrast(uint16_t value);
#elif ENABLED(SHOW_BOOTSCREEN) #elif ENABLED(SHOW_BOOTSCREEN)
void bootscreen(); void bootscreen();
#endif #endif
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
#define LCD_UPDATE_INTERVAL 100 #define LCD_UPDATE_INTERVAL 100
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
@ -83,9 +83,9 @@
void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual
void lcd_completion_feedback(const bool good=true); void lcd_completion_feedback(const bool good=true);
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
void lcd_filament_change_show_message(const FilamentChangeMessage message); void lcd_advanced_pause_show_message(const AdvancedPauseMessage message);
#endif // FILAMENT_CHANGE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
#else #else
@ -149,21 +149,26 @@
#endif #endif
#else // no LCD #else // no LCD
inline void lcd_update() {} inline void lcd_update() {}
inline void lcd_init() {} inline void lcd_init() {}
inline bool lcd_hasstatus() { return false; } inline bool lcd_hasstatus() { return false; }
inline void lcd_setstatus(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); } inline void lcd_setstatus(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); }
inline void lcd_setstatuspgm(const char* const message, const uint8_t level=0) { UNUSED(message); UNUSED(level); } inline void lcd_setstatusPGM(const char* const message, const int8_t level=0) { UNUSED(message); UNUSED(level); }
inline void lcd_setalertstatusPGM(const char* message) { UNUSED(message); }
inline void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) { UNUSED(level); UNUSED(fmt); } inline void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) { UNUSED(level); UNUSED(fmt); }
inline void lcd_buttons_update() {} inline void lcd_buttons_update() {}
inline void lcd_reset_alert_level() {} inline void lcd_reset_alert_level() {}
inline bool lcd_detected() { return true; } inline bool lcd_detected() { return true; }
inline void lcd_refresh() {}
#define LCD_MESSAGEPGM(x) NOOP
#define LCD_ALERTMESSAGEPGM(x) NOOP
#endif // ULTRA_LCD #endif // ULTRA_LCD
#define LCD_MESSAGEPGM(x) lcd_setstatusPGM(PSTR(x))
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatusPGM(PSTR(x))
void lcd_reset_status();
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
void lcd_mesh_edit_setup(float initial); void lcd_mesh_edit_setup(float initial);
float lcd_mesh_edit(); float lcd_mesh_edit();

@ -195,7 +195,7 @@
#include "utf_mapper.h" #include "utf_mapper.h"
int lcd_contrast; uint16_t lcd_contrast;
static char currentfont = 0; static char currentfont = 0;
// The current graphical page being rendered // The current graphical page being rendered
@ -234,13 +234,24 @@ char lcd_print_and_count(const char c) {
else return charset_mapper(c); else return charset_mapper(c);
} }
void lcd_print(const char* const str) { /**
for (uint8_t i = 0; char c = str[i]; ++i) lcd_print(c); * Core LCD printing functions
* On DOGM all strings go through a filter for utf
* But only use lcd_print_utf and lcd_printPGM_utf for translated text
*/
void lcd_print(const char* const str) { for (uint8_t i = 0; char c = str[i]; ++i) lcd_print(c); }
void lcd_printPGM(const char* str) { for (; char c = pgm_read_byte(str); ++str) lcd_print(c); }
void lcd_print_utf(const char* const str, const uint8_t maxLength=LCD_WIDTH) {
char c;
for (uint8_t i = 0, n = maxLength; n && (c = str[i]); ++i)
n -= charset_mapper(c);
} }
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ void lcd_printPGM_utf(const char* str, const uint8_t maxLength=LCD_WIDTH) {
void lcd_printPGM(const char* str) { char c;
for (; char c = pgm_read_byte(str); ++str) lcd_print(c); for (uint8_t i = 0, n = maxLength; n && (c = str[i]); ++i)
n -= charset_mapper(c);
} }
// Initialize or re-initialize the LCD // Initialize or re-initialize the LCD
@ -320,7 +331,7 @@ static void lcd_implementation_init() {
void lcd_kill_screen() { void lcd_kill_screen() {
lcd_setFont(FONT_MENU); lcd_setFont(FONT_MENU);
u8g.setPrintPos(0, u8g.getHeight()/4*1); u8g.setPrintPos(0, u8g.getHeight()/4*1);
lcd_print(lcd_status_message); lcd_print_utf(lcd_status_message);
u8g.setPrintPos(0, u8g.getHeight()/4*2); u8g.setPrintPos(0, u8g.getHeight()/4*2);
lcd_printPGM(PSTR(MSG_HALTED)); lcd_printPGM(PSTR(MSG_HALTED));
u8g.setPrintPos(0, u8g.getHeight()/4*3); u8g.setPrintPos(0, u8g.getHeight()/4*3);
@ -340,15 +351,26 @@ FORCE_INLINE void _draw_centered_temp(const int temp, const uint8_t x, const uin
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
} }
FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater) { FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) {
#if HAS_TEMP_BED #if HAS_TEMP_BED
bool isBed = heater < 0; bool isBed = heater < 0;
#else #else
const bool isBed = false; const bool isBed = false;
#endif #endif
if (PAGE_UNDER(7)) if (PAGE_UNDER(7)) {
_draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); #if ENABLED(ADVANCED_PAUSE_FEATURE)
const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
#if HAS_TEMP_BED
thermalManager.is_bed_idle()
#else
false
#endif
);
if (blink || !is_idle)
#endif
_draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); }
if (PAGE_CONTAINS(21, 28)) if (PAGE_CONTAINS(21, 28))
_draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28); _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28);
@ -384,6 +406,20 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
} }
} }
inline void lcd_implementation_status_message() {
#if ENABLED(STATUS_MESSAGE_SCROLLING)
lcd_print_utf(lcd_status_message + status_scroll_pos);
const uint8_t slen = lcd_strlen(lcd_status_message);
if (slen > LCD_WIDTH) {
// Skip any non-printing bytes
while (!PRINTABLE(lcd_status_message[status_scroll_pos])) ++status_scroll_pos;
if (++status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0;
}
#else
lcd_print_utf(lcd_status_message);
#endif
}
//#define DOGM_SD_PERCENT //#define DOGM_SD_PERCENT
static void lcd_implementation_status_screen() { static void lcd_implementation_status_screen() {
@ -415,11 +451,11 @@ static void lcd_implementation_status_screen() {
if (PAGE_UNDER(28)) { if (PAGE_UNDER(28)) {
// Extruders // Extruders
HOTEND_LOOP() _draw_heater_status(5 + e * 25, e); HOTEND_LOOP() _draw_heater_status(5 + e * 25, e, blink);
// Heated bed // Heated bed
#if HOTENDS < 4 && HAS_TEMP_BED #if HOTENDS < 4 && HAS_TEMP_BED
_draw_heater_status(81, -1); _draw_heater_status(81, -1, blink);
#endif #endif
#if HAS_FAN0 #if HAS_FAN0
@ -634,7 +670,7 @@ static void lcd_implementation_status_screen() {
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line
lcd_print(lcd_status_message); lcd_implementation_status_message();
} }
else { else {
lcd_printPGM(PSTR(LCD_STR_FILAM_DIA)); lcd_printPGM(PSTR(LCD_STR_FILAM_DIA));
@ -646,7 +682,7 @@ static void lcd_implementation_status_screen() {
u8g.print('%'); u8g.print('%');
} }
#else #else
lcd_print(lcd_status_message); lcd_implementation_status_message();
#endif #endif
} }
} }
@ -656,7 +692,7 @@ static void lcd_implementation_status_screen() {
uint8_t row_y1, row_y2; uint8_t row_y1, row_y2;
uint8_t constexpr row_height = DOG_CHAR_HEIGHT + 2 * (TALL_FONT_CORRECTION); uint8_t constexpr row_height = DOG_CHAR_HEIGHT + 2 * (TALL_FONT_CORRECTION);
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
static void lcd_implementation_hotend_status(const uint8_t row) { static void lcd_implementation_hotend_status(const uint8_t row) {
row_y1 = row * row_height + 1; row_y1 = row * row_height + 1;
@ -673,7 +709,7 @@ static void lcd_implementation_status_screen() {
lcd_print(itostr3(thermalManager.degTargetHotend(active_extruder))); lcd_print(itostr3(thermalManager.degTargetHotend(active_extruder)));
} }
#endif // FILAMENT_CHANGE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
// Set the colors for a menu item based on whether it is selected // Set the colors for a menu item based on whether it is selected
static void lcd_implementation_mark_as_selected(const uint8_t row, const bool isSelected) { static void lcd_implementation_mark_as_selected(const uint8_t row, const bool isSelected) {

@ -380,16 +380,22 @@ static void lcd_implementation_init(
void lcd_implementation_clear() { lcd.clear(); } void lcd_implementation_clear() { lcd.clear(); }
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ void lcd_print(const char c) { charset_mapper(c); }
void lcd_printPGM(const char *str) {
for (; char c = pgm_read_byte(str); ++str) charset_mapper(c); void lcd_print(const char * const str) { for (uint8_t i = 0; char c = str[i]; ++i) lcd.print(c); }
} void lcd_printPGM(const char* str) { for (; char c = pgm_read_byte(str); ++str) lcd.print(c); }
void lcd_print(const char* const str) { void lcd_print_utf(const char * const str, const uint8_t maxLength=LCD_WIDTH) {
for (uint8_t i = 0; char c = str[i]; ++i) charset_mapper(c); char c;
for (uint8_t i = 0, n = maxLength; n && (c = str[i]); ++i)
n -= charset_mapper(c);
} }
void lcd_print(char c) { charset_mapper(c); } void lcd_printPGM_utf(const char* str, const uint8_t maxLength=LCD_WIDTH) {
char c;
for (uint8_t i = 0, n = maxLength; n && (c = str[i]); ++i)
n -= charset_mapper(c);
}
#if ENABLED(SHOW_BOOTSCREEN) #if ENABLED(SHOW_BOOTSCREEN)
@ -545,7 +551,7 @@ void lcd_print(char c) { charset_mapper(c); }
void lcd_kill_screen() { void lcd_kill_screen() {
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd_print(lcd_status_message); lcd_print_utf(lcd_status_message);
#if LCD_HEIGHT < 4 #if LCD_HEIGHT < 4
lcd.setCursor(0, 2); lcd.setCursor(0, 2);
#else #else
@ -573,6 +579,41 @@ FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr,
} }
} }
FORCE_INLINE void _draw_heater_status(const int8_t heater, const char prefix, const bool blink) {
const bool isBed = heater < 0;
const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)),
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater));
if (prefix >= 0) lcd.print(prefix);
lcd.print(itostr3(t1 + 0.5));
lcd.print('/');
#if ENABLED(ADVANCED_PAUSE_FEATURE)
const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
#if HAS_TEMP_BED
thermalManager.is_bed_idle()
#else
false
#endif
);
if (!blink && is_idle) {
lcd.print(' ');
if (t2 >= 10) lcd.print(' ');
if (t2 >= 100) lcd.print(' ');
}
else
#endif
lcd.print(itostr3left(t2 + 0.5));
if (prefix >= 0) {
lcd_printPGM(PSTR(LCD_STR_DEGREE " "));
if (t2 < 10) lcd.print(' ');
}
}
#if ENABLED(LCD_PROGRESS_BAR) #if ENABLED(LCD_PROGRESS_BAR)
inline void lcd_draw_progress_bar(const uint8_t percent) { inline void lcd_draw_progress_bar(const uint8_t percent) {
@ -616,17 +657,7 @@ Possible status screens:
|01234567890123456789| |01234567890123456789|
*/ */
static void lcd_implementation_status_screen() { static void lcd_implementation_status_screen() {
bool blink = lcd_blink();
#define LCD_TEMP_ONLY(T1,T2) \
lcd.print(itostr3(T1 + 0.5)); \
lcd.print('/'); \
lcd.print(itostr3left(T2 + 0.5))
#define LCD_TEMP(T1,T2,PREFIX) \
lcd.print(PREFIX); \
LCD_TEMP_ONLY(T1,T2); \
lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); \
if (T2 < 10) lcd.print(' ')
// //
// Line 1 // Line 1
@ -639,7 +670,7 @@ static void lcd_implementation_status_screen() {
// //
// Hotend 0 Temperature // Hotend 0 Temperature
// //
LCD_TEMP_ONLY(thermalManager.degHotend(0), thermalManager.degTargetHotend(0)); _draw_heater_status(0, -1, blink);
// //
// Hotend 1 or Bed Temperature // Hotend 1 or Bed Temperature
@ -649,10 +680,10 @@ static void lcd_implementation_status_screen() {
lcd.setCursor(8, 0); lcd.setCursor(8, 0);
#if HOTENDS > 1 #if HOTENDS > 1
lcd.print(LCD_STR_THERMOMETER[0]); lcd.print(LCD_STR_THERMOMETER[0]);
LCD_TEMP_ONLY(thermalManager.degHotend(1), thermalManager.degTargetHotend(1)); _draw_heater_status(1, -1, blink);
#else #else
lcd.print(LCD_STR_BEDTEMP[0]); lcd.print(LCD_STR_BEDTEMP[0]);
LCD_TEMP_ONLY(thermalManager.degBed(), thermalManager.degTargetBed()); _draw_heater_status(-1, -1, blink);
#endif #endif
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0 #endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
@ -662,7 +693,7 @@ static void lcd_implementation_status_screen() {
// //
// Hotend 0 Temperature // Hotend 0 Temperature
// //
LCD_TEMP(thermalManager.degHotend(0), thermalManager.degTargetHotend(0), LCD_STR_THERMOMETER[0]); _draw_heater_status(0, LCD_STR_THERMOMETER[0], blink);
// //
// Hotend 1 or Bed Temperature // Hotend 1 or Bed Temperature
@ -670,9 +701,9 @@ static void lcd_implementation_status_screen() {
#if HOTENDS > 1 || TEMP_SENSOR_BED != 0 #if HOTENDS > 1 || TEMP_SENSOR_BED != 0
lcd.setCursor(10, 0); lcd.setCursor(10, 0);
#if HOTENDS > 1 #if HOTENDS > 1
LCD_TEMP(thermalManager.degHotend(1), thermalManager.degTargetHotend(1), LCD_STR_THERMOMETER[0]); _draw_heater_status(1, LCD_STR_THERMOMETER[0], blink);
#else #else
LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]); _draw_heater_status(-1, LCD_STR_BEDTEMP[0], blink);
#endif #endif
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0 #endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
@ -685,8 +716,6 @@ static void lcd_implementation_status_screen() {
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
bool blink = lcd_blink();
#if LCD_WIDTH < 20 #if LCD_WIDTH < 20
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
@ -708,7 +737,7 @@ static void lcd_implementation_status_screen() {
// If we both have a 2nd extruder and a heated bed, // If we both have a 2nd extruder and a heated bed,
// show the heated bed temp on the left, // show the heated bed temp on the left,
// since the first line is filled with extruder temps // since the first line is filled with extruder temps
LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]); _draw_heater_status(-1, LCD_STR_BEDTEMP[0], blink);
#else #else
// Before homing the axis letters are blinking 'X' <-> '?'. // Before homing the axis letters are blinking 'X' <-> '?'.
@ -777,8 +806,10 @@ static void lcd_implementation_status_screen() {
// Draw the progress bar if the message has shown long enough // Draw the progress bar if the message has shown long enough
// or if there is no message set. // or if there is no message set.
if (card.isFileOpen() && ELAPSED(millis(), progress_bar_ms + PROGRESS_BAR_MSG_TIME) || !lcd_status_message[0]) if (card.isFileOpen() && (ELAPSED(millis(), progress_bar_ms + PROGRESS_BAR_MSG_TIME) || !lcd_status_message[0])) {
return lcd_draw_progress_bar(card.percentDone()); const uint8_t percent = card.percentDone();
if (percent) return lcd_draw_progress_bar(percent);
}
#elif ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) #elif ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
@ -795,12 +826,22 @@ static void lcd_implementation_status_screen() {
#endif // FILAMENT_LCD_DISPLAY && SDSUPPORT #endif // FILAMENT_LCD_DISPLAY && SDSUPPORT
lcd_print(lcd_status_message); #if ENABLED(STATUS_MESSAGE_SCROLLING)
lcd_print_utf(lcd_status_message + status_scroll_pos);
const uint8_t slen = lcd_strlen(lcd_status_message);
if (slen > LCD_WIDTH) {
// Skip any non-printing bytes
while (!PRINTABLE(lcd_status_message[status_scroll_pos])) ++status_scroll_pos;
if (++status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0;
}
#else
lcd_print_utf(lcd_status_message);
#endif
} }
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
static void lcd_implementation_hotend_status(const uint8_t row) { static void lcd_implementation_hotend_status(const uint8_t row) {
if (row < LCD_HEIGHT) { if (row < LCD_HEIGHT) {
@ -812,7 +853,7 @@ static void lcd_implementation_status_screen() {
} }
} }
#endif // FILAMENT_CHANGE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
static void lcd_implementation_drawmenu_static(const uint8_t row, const char* pstr, const bool center=true, const bool invert=false, const char *valstr=NULL) { static void lcd_implementation_drawmenu_static(const uint8_t row, const char* pstr, const bool center=true, const bool invert=false, const char *valstr=NULL) {
UNUSED(invert); UNUSED(invert);

@ -151,7 +151,7 @@
static bool seen_c2 = false; static bool seen_c2 = false;
uint8_t d = c; uint8_t d = c;
if (d >= 0x80u) { // UTF-8 handling if (d >= 0x80u) { // UTF-8 handling
if ( (d >= 0xC0u) && (!seen_c2) ) { if (d >= 0xC0u && !seen_c2) {
utf_hi_char = d - 0xC2u; utf_hi_char = d - 0xC2u;
seen_c2 = true; seen_c2 = true;
return 0; return 0;
@ -188,7 +188,7 @@
if (d >= 0x80u) { // UTF-8 handling if (d >= 0x80u) { // UTF-8 handling
if (d == 0xC4u) { seen_c4 = true; return 0; } if (d == 0xC4u) { seen_c4 = true; return 0; }
else if (d == 0xC5u) { seen_c5 = true; return 0; } else if (d == 0xC5u) { seen_c5 = true; return 0; }
else if ( (d >= 0xC0u) && (!seen_c2) ) { else if (d >= 0xC0u && !seen_c2) {
utf_hi_char = d - 0xC2u; utf_hi_char = d - 0xC2u;
seen_c2 = true; seen_c2 = true;
return 0; return 0;
@ -237,7 +237,7 @@
static bool seen_ce = false; static bool seen_ce = false;
uint8_t d = c; uint8_t d = c;
if (d >= 0x80) { // UTF-8 handling if (d >= 0x80) { // UTF-8 handling
if ( (d >= 0xC0) && (!seen_ce) ) { if (d >= 0xC0 && !seen_ce) {
utf_hi_char = d - 0xCE; utf_hi_char = d - 0xCE;
seen_ce = true; seen_ce = true;
return 0; return 0;

@ -34,6 +34,19 @@ void safe_delay(millis_t ms) {
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
} }
#if ENABLED(EEPROM_SETTINGS)
void crc16(uint16_t *crc, const void * const data, uint16_t cnt) {
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++)
*crc = (uint16_t)((*crc & 0x8000) ? ((uint16_t)(*crc << 1) ^ 0x1021) : (*crc << 1));
}
}
#endif // EEPROM_SETTINGS
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
char conv[8] = { 0 }; char conv[8] = { 0 };

@ -25,6 +25,10 @@
void safe_delay(millis_t ms); void safe_delay(millis_t ms);
#if ENABLED(EEPROM_SETTINGS)
void crc16(uint16_t *crc, const void * const data, uint16_t cnt);
#endif
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
// Convert unsigned int to string with 12 format // Convert unsigned int to string with 12 format

@ -73,7 +73,7 @@ More features have been added by:
- [[@Tannoo](https://github.com/Tannoo)] - [[@Tannoo](https://github.com/Tannoo)]
- [[@teemuatlut](https://github.com/teemuatlut)] - [[@teemuatlut](https://github.com/teemuatlut)]
- [[@bgort](https://github.com/bgort)] - [[@bgort](https://github.com/bgort)]
- [[@LVD-AC](https://github.com/LVD-AC)] - Luc Van Daele[[@LVD-AC](https://github.com/LVD-AC)] - Dutch, French, English
- [[@paulusjacobus](https://github.com/paulusjacobus)] - [[@paulusjacobus](https://github.com/paulusjacobus)]
- ...and many others - ...and many others

@ -16,12 +16,6 @@ if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
exit exit
fi fi
if [[ $BRANCH != "master" ]]; then
echo "Stashing changes and changing to master."
git stash
git checkout master
fi
opensite() { opensite() {
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }') TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
URL="http://127.0.0.1:4000/" URL="http://127.0.0.1:4000/"
@ -40,9 +34,3 @@ echo "Previewing MarlinDocumentation..."
( sleep 45; opensite ) & ( sleep 45; opensite ) &
bundle exec jekyll serve --watch --incremental bundle exec jekyll serve --watch --incremental
if [[ $BRANCH != "master" ]]; then
echo "Restoring branch '$BRANCH'"
git checkout $BRANCH
git stash pop
fi

@ -22,42 +22,45 @@ if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
exit exit
fi fi
# Check out the named branch (or stay in current)
git checkout $BRANCH
if [[ $BRANCH == "gh-pages" ]]; then if [[ $BRANCH == "gh-pages" ]]; then
echo "Can't build from 'gh-pages.' Only the Jekyll branches (based on 'master')." echo "Can't build from 'gh-pages.' Only the Jekyll branches (based on 'master')."
bundle exec jekyll serve --watch
exit exit
fi fi
if [[ $BRANCH != "master" ]]; then echo "Stashing any changes to files..."
echo "Don't forget to update and push 'master'!" echo "Don't forget to update and push 'master'!"
# GOJF Card # GOJF Card
git stash git stash
fi
# Check out the named branch (or stay in current)
git checkout $BRANCH
echo "Generating MarlinDocumentation..."
COMMIT=$( git log --format="%H" -n 1 ) COMMIT=$( git log --format="%H" -n 1 )
# Clean out changes and other junk in the branch # Clean out changes and other junk in the branch
git reset --hard
git clean -d -f git clean -d -f
# Push 'master' to the fork and make a proper PR... # Push 'master' to the fork and make a proper PR...
if [[ $BRANCH == "master" ]]; then if [[ $BRANCH == "master" ]]; then
if [[ $FORK == "MarlinFirmware" ]]; then
# Allow working directly with the main fork # Allow working directly with the main fork
echo
echo -n "Pushing to origin/master... "
git push -f origin
echo
echo -n "Pushing to upstream/master... "
git push -f upstream git push -f upstream
else else
if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush; fi if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then
firstpush
else
echo
echo -n "Pushing to origin/$BRANCH... "
git push -f origin git push -f origin
fi
TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }') TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1" URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
@ -72,12 +75,13 @@ if [[ $BRANCH == "master" ]]; then
fi fi
fi
# Uncomment to compress the final html files # Uncomment to compress the final html files
# mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb # mv ./_plugins/jekyll-press.rb-disabled ./_plugins/jekyll-press.rb
# bundle install # bundle install
echo
echo "Generating MarlinDocumentation..."
# build the site statically and proof it # build the site statically and proof it
bundle exec jekyll build --profile --trace --no-watch bundle exec jekyll build --profile --trace --no-watch
bundle exec htmlproofer ./_site --only-4xx --allow-hash-href --check-favicon --check-html --url-swap ".*marlinfw.org/:/" bundle exec htmlproofer ./_site --only-4xx --allow-hash-href --check-favicon --check-html --url-swap ".*marlinfw.org/:/"
@ -90,7 +94,7 @@ rsync -av _site/ ${TMPFOLDER}/
git reset --hard git reset --hard
git clean -d -f git clean -d -f
# Sync built-site with gh-pages # Copy built-site into the gh-pages branch
git checkout gh-pages git checkout gh-pages
rsync -av ${TMPFOLDER}/ ./ rsync -av ${TMPFOLDER}/ ./
@ -104,3 +108,7 @@ rm -rf ${TMPFOLDER}
# Go back to the branch we started from # Go back to the branch we started from
git checkout $BRANCH git checkout $BRANCH
if [[ $BRANCH != "master" ]]; then
git stash pop
fi

@ -1,26 +1,26 @@
// Search pins uasable for endstop-interupts // Search pins usable for endstop-interrupts
// Compile with the same settings you'd use with Marlin. // Compile with the same build settings you'd use for Marlin.
#if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA) #if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA)
#undef digitalPinToPCICR #undef digitalPinToPCICR
#define digitalPinToPCICR(p) ( (((p) >= 10) && ((p) <= 15)) || \ #define digitalPinToPCICR(p) ( ((p) >= 10 && (p) <= 15) || \
(((p) >= 50) && ((p) <= 53)) || \ ((p) >= 50 && (p) <= 53) || \
(((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) ) ((p) >= 62 && (p) <= 69) ? &PCICR : (uint8_t *)0)
#endif #endif
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
Serial.println("PINs causing interrups are:"); Serial.println("PINs causing interrups are:");
for (int i = 2; i < NUM_DIGITAL_PINS; i++) { for (int i = 2; i < NUM_DIGITAL_PINS; i++) {
if( digitalPinToPCICR(i) != NULL || (int)digitalPinToInterrupt(i) != -1 ) { if (digitalPinToPCICR(i) || (int)digitalPinToInterrupt(i) != -1) {
for (int j = 0; j < NUM_ANALOG_INPUTS; j++) { for (int j = 0; j < NUM_ANALOG_INPUTS; j++) {
if (analogInputToDigitalPin(j) == i) { if (analogInputToDigitalPin(j) == i) {
Serial.print("A"); Serial.print('A');
Serial.print(j); Serial.print(j);
Serial.print(" = "); Serial.print(" = ");
} }
} }
Serial.print("D"); Serial.print('D');
Serial.println(i); Serial.println(i);
} }
} }

@ -12,16 +12,16 @@
# targets = upload # targets = upload
[platformio] [platformio]
src_dir = ./ src_dir = Marlin
envs_dir = ../.pioenvs envs_dir = .pioenvs
lib_dir = ../.piolib lib_dir = .piolib
libdeps_dir = ../.piolibdeps libdeps_dir = .piolibdeps
env_default = mega2560 env_default = megaatmega2560
[common] [common]
lib_deps = U8glib@1.19.1 lib_deps = U8glib@1.19.1
[env:mega2560] [env:megaatmega2560]
platform = atmelavr platform = atmelavr
framework = arduino framework = arduino
board = megaatmega2560 board = megaatmega2560
@ -29,7 +29,7 @@ build_flags = -I $BUILDSRC_DIR
board_f_cpu = 16000000L board_f_cpu = 16000000L
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
[env:mega1280] [env:megaatmega1280]
platform = atmelavr platform = atmelavr
framework = arduino framework = arduino
board = megaatmega1280 board = megaatmega1280
Loading…
Cancel
Save