Skip to content

Commit

Permalink
Merge branch 'bugfix-2.1.x' into HEVO-BTT-SKR-1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
uBaHoFF committed Jan 11, 2023
2 parents 6444761 + 0838f70 commit 73fa199
Show file tree
Hide file tree
Showing 44 changed files with 724 additions and 167 deletions.
275 changes: 273 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,210 @@
//#define COREZX
//#define COREZY

// Enable for a belt style printer with endless "Z" motion
//#define BELTPRINTER

// Enable for Polargraph Kinematics
//#define POLARGRAPH
#if ENABLED(POLARGRAPH)
#define POLARGRAPH_MAX_BELT_LEN 1035.0
#define DEFAULT_SEGMENTS_PER_SECOND 5
#endif

// @section delta

// Enable for DELTA kinematics and configure below
//#define DELTA
#if ENABLED(DELTA)

// Make delta curves from many straight lines (linear interpolation).
// This is a trade-off between visible corners (not enough segments)
// and processor overload (too many expensive sqrt calls).
#define DEFAULT_SEGMENTS_PER_SECOND 200

// After homing move down to a height where XY movement is unconstrained
//#define DELTA_HOME_TO_SAFE_ZONE

// Delta calibration menu
// Add three-point calibration to the MarlinUI menu.
// See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU

// G33 Delta Auto-Calibration. Enable EEPROM_SETTINGS to store results.
//#define DELTA_AUTO_CALIBRATION

#if ENABLED(DELTA_AUTO_CALIBRATION)
// Default number of probe points : n*n (1 -> 7)
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
#endif

#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
// Step size for paper-test probing
#define PROBE_MANUALLY_STEP 0.05 // (mm)
#endif

// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define PRINTABLE_RADIUS 140.0 // (mm)

// Maximum reachable area
#define DELTA_MAX_RADIUS 140.0 // (mm)

// Center-to-center distance of the holes in the diagonal push rods.
#define DELTA_DIAGONAL_ROD 250.0 // (mm)

// Distance between bed and nozzle Z home position
#define DELTA_HEIGHT 250.00 // (mm) Get this value from G33 auto calibrate

#define DELTA_ENDSTOP_ADJ { 0.0, 0.0, 0.0 } // Get these values from G33 auto calibrate

// Horizontal distance bridged by diagonal push rods when effector is centered.
#define DELTA_RADIUS 124.0 // (mm) Get this value from G33 auto calibrate

// Trim adjustments for individual towers
// tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
// measured in degrees anticlockwise looking from above the printer
#define DELTA_TOWER_ANGLE_TRIM { 0.0, 0.0, 0.0 } // Get these values from G33 auto calibrate

// Delta radius and diagonal rod adjustments (mm)
//#define DELTA_RADIUS_TRIM_TOWER { 0.0, 0.0, 0.0 }
//#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 }
#endif

// @section scara

/**
* MORGAN_SCARA was developed by QHARLEY in South Africa in 2012-2013.
* Implemented and slightly reworked by JCERNY in June, 2014.
*
* Mostly Printed SCARA is an open source design by Tyler Williams. See:
* https://www.thingiverse.com/thing:2487048
* https://www.thingiverse.com/thing:1241491
*/
//#define MORGAN_SCARA
//#define MP_SCARA
#if EITHER(MORGAN_SCARA, MP_SCARA)
// If movement is choppy try lowering this value
#define DEFAULT_SEGMENTS_PER_SECOND 200

// Length of inner and outer support arms. Measure arm lengths precisely.
#define SCARA_LINKAGE_1 150 // (mm)
#define SCARA_LINKAGE_2 150 // (mm)

// SCARA tower offset (position of Tower relative to bed zero position)
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
#define SCARA_OFFSET_X 100 // (mm)
#define SCARA_OFFSET_Y -56 // (mm)

#if ENABLED(MORGAN_SCARA)

//#define DEBUG_SCARA_KINEMATICS
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly

// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)

#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See http://reprap.harleystudio.co.za/?page_id=1073

#elif ENABLED(MP_SCARA)

#define SCARA_OFFSET_THETA1 12 // degrees
#define SCARA_OFFSET_THETA2 131 // degrees

#endif

#endif

// @section tpara

// Enable for TPARA kinematics and configure below
//#define AXEL_TPARA
#if ENABLED(AXEL_TPARA)
#define DEBUG_TPARA_KINEMATICS
#define DEFAULT_SEGMENTS_PER_SECOND 200

// Length of inner and outer support arms. Measure arm lengths precisely.
#define TPARA_LINKAGE_1 120 // (mm)
#define TPARA_LINKAGE_2 120 // (mm)

// SCARA tower offset (position of Tower relative to bed zero position)
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
#define TPARA_OFFSET_X 0 // (mm)
#define TPARA_OFFSET_Y 0 // (mm)
#define TPARA_OFFSET_Z 0 // (mm)

#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly

// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)

// Calculated from Calibration Guide and M360 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
#define THETA_HOMING_OFFSET 0
#define PSI_HOMING_OFFSET 0
#endif

// @section polar

/**
* POLAR Kinematics
* developed by Kadir ilkimen for PolarBear CNC and babyBear
* https://github.com/kadirilkimen/Polar-Bear-Cnc-Machine
* https://github.com/kadirilkimen/babyBear-3D-printer
*
* A polar machine can have different configurations.
* This kinematics is only compatible with the following configuration:
* X : Independent linear
* Y or B : Polar
* Z : Independent linear
*
* For example, PolarBear has CoreXZ plus Polar Y or B.
*
* Motion problem for Polar axis near center / origin:
*
* 3D printing:
* Movements very close to the center of the polar axis take more time than others.
* This brief delay results in more material deposition due to the pressure in the nozzle.
*
* Current Kinematics and feedrate scaling deals with this by making the movement as fast
* as possible. It works for slow movements but doesn't work well with fast ones. A more
* complicated extrusion compensation must be implemented.
*
* Ideally, it should estimate that a long rotation near the center is ahead and will cause
* unwanted deposition. Therefore it can compensate the extrusion beforehand.
*
* Laser cutting:
* Same thing would be a problem for laser engraving too. As it spends time rotating at the
* center point, more likely it will burn more material than it should. Therefore similar
* compensation would be implemented for laser-cutting operations.
*
* Milling:
* This shouldn't be a problem for cutting/milling operations.
*/
//#define POLAR
#if ENABLED(POLAR)
#define DEFAULT_SEGMENTS_PER_SECOND 180 // If movement is choppy try lowering this value
#define PRINTABLE_RADIUS 82.0f // (mm) Maximum travel of X axis

// Movements fall inside POLAR_FAST_RADIUS are assigned the highest possible feedrate
// to compensate unwanted deposition related to the near-origin motion problem.
#define POLAR_FAST_RADIUS 3.0f // (mm)

// Radius which is unreachable by the tool.
// Needed if the tool is not perfectly aligned to the center of the polar axis.
#define POLAR_CENTER_OFFSET 0.0f // (mm)

#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#endif

// @section machine

// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
//#define ARTICULATED_ROBOT_ARM

// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
//#define FOAMCUTTER_XYUV

//===========================================================================
//============================== Endstop Settings ===========================
//===========================================================================
Expand Down Expand Up @@ -755,8 +959,75 @@
//

/**
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
* X and Y offsets must be integers.
* Magnetically Mounted Probe
* For probes such as Euclid, Klicky, Klackender, etc.
*/
//#define MAG_MOUNTED_PROBE
#if ENABLED(MAG_MOUNTED_PROBE)
#define PROBE_DEPLOY_FEEDRATE (133*60) // (mm/min) Probe deploy speed
#define PROBE_STOW_FEEDRATE (133*60) // (mm/min) Probe stow speed

#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock
#define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_DEPLOY_4 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_DEPLOY_5 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_STOW_1 { PROBE_STOW_FEEDRATE, { 245, 114, 20 } } // Move to dock
#define MAG_MOUNTED_STOW_2 { PROBE_STOW_FEEDRATE, { 245, 114, 0 } } // Place probe beside remover
#define MAG_MOUNTED_STOW_3 { PROBE_STOW_FEEDRATE, { 230, 114, 0 } } // Side move to remove probe
#define MAG_MOUNTED_STOW_4 { PROBE_STOW_FEEDRATE, { 210, 114, 20 } } // Side move to remove probe
#define MAG_MOUNTED_STOW_5 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#endif

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

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

/**
* Allen key retractable z-probe as seen on many Kossel delta printers - https://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
* Deploys by touching z-axis belt. Retracts by pushing the probe down.
*/
//#define Z_PROBE_ALLEN_KEY
#if ENABLED(Z_PROBE_ALLEN_KEY)
// 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
// if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.

#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10

#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_FEEDRATE)/10

#define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_FEEDRATE

#endif // Z_PROBE_ALLEN_KEY

/**
* Nozzle-to-Probe offsets { X, Y, Z }
*
* In the following example the X and Y offsets are both positive:
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10
Expand Down
15 changes: 9 additions & 6 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,15 @@
// before a MINTEMP error is triggered. (Shouldn't be more than 10.)
//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0

// The number of milliseconds a hotend will preheat before starting to check
// the temperature. This value should NOT be set to the time it takes the
// hot end to reach the target temperature, but the time it takes to reach
// the minimum temperature your thermistor can read. The lower the better/safer.
// This shouldn't need to be more than 30 seconds (30000)
//#define MILLISECONDS_PREHEAT_TIME 0
/**
* The number of milliseconds a hotend will preheat before starting to check
* the temperature. This value should NOT be set to the time it takes the
* hot end to reach the target temperature, but the time it takes to reach
* the minimum temperature your thermistor can read. The lower the better/safer.
* This shouldn't need to be more than 30 seconds (30000)
*/
//#define PREHEAT_TIME_HOTEND_MS 0
//#define PREHEAT_TIME_BED_MS 0

// @section extruder

Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2023-01-09"
//#define STRING_DISTRIBUTION_DATE "2023-01-11"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/NATIVE_SIM/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ class MarlinHAL {
MarlinHAL() {}

// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
static void watchdog_init();
static void watchdog_refresh();

static void init() {} // Called early in setup()
static void init_board() {} // Called less early in setup()
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
#include "module/polargraph.h"
#elif IS_SCARA
#include "module/scara.h"
#elif ENABLED(POLAR)
#include "module/polar.h"
#endif

#if HAS_LEVELING
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
#define STR_S_SEG_PER_SEC "S<seg-per-sec>"
#define STR_DELTA_SETTINGS "Delta (L<diagonal-rod> R<radius> H<height> S<seg-per-sec> XYZ<tower-angle-trim> ABC<rod-trim>)"
#define STR_SCARA_SETTINGS "SCARA"
#define STR_POLAR_SETTINGS "Polar"
#define STR_POLARGRAPH_SETTINGS "Polargraph"
#define STR_SCARA_P_T_Z "P<theta-psi-offset> T<theta-offset> Z<home-offset>"
#define STR_ENDSTOP_ADJUSTMENT "Endstop adjustment"
Expand Down
Loading

0 comments on commit 73fa199

Please sign in to comment.