Skip to content

Commit 73fa199

Browse files
committed
Merge branch 'bugfix-2.1.x' into HEVO-BTT-SKR-1.3
2 parents 6444761 + 0838f70 commit 73fa199

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+724
-167
lines changed

Marlin/Configuration.h

+273-2
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,210 @@
498498
//#define COREZX
499499
//#define COREZY
500500

501+
// Enable for a belt style printer with endless "Z" motion
502+
//#define BELTPRINTER
503+
504+
// Enable for Polargraph Kinematics
505+
//#define POLARGRAPH
506+
#if ENABLED(POLARGRAPH)
507+
#define POLARGRAPH_MAX_BELT_LEN 1035.0
508+
#define DEFAULT_SEGMENTS_PER_SECOND 5
509+
#endif
510+
511+
// @section delta
512+
513+
// Enable for DELTA kinematics and configure below
514+
//#define DELTA
515+
#if ENABLED(DELTA)
516+
517+
// Make delta curves from many straight lines (linear interpolation).
518+
// This is a trade-off between visible corners (not enough segments)
519+
// and processor overload (too many expensive sqrt calls).
520+
#define DEFAULT_SEGMENTS_PER_SECOND 200
521+
522+
// After homing move down to a height where XY movement is unconstrained
523+
//#define DELTA_HOME_TO_SAFE_ZONE
524+
525+
// Delta calibration menu
526+
// Add three-point calibration to the MarlinUI menu.
527+
// See http://minow.blogspot.com/index.html#4918805519571907051
528+
//#define DELTA_CALIBRATION_MENU
529+
530+
// G33 Delta Auto-Calibration. Enable EEPROM_SETTINGS to store results.
531+
//#define DELTA_AUTO_CALIBRATION
532+
533+
#if ENABLED(DELTA_AUTO_CALIBRATION)
534+
// Default number of probe points : n*n (1 -> 7)
535+
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
536+
#endif
537+
538+
#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
539+
// Step size for paper-test probing
540+
#define PROBE_MANUALLY_STEP 0.05 // (mm)
541+
#endif
542+
543+
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
544+
#define PRINTABLE_RADIUS 140.0 // (mm)
545+
546+
// Maximum reachable area
547+
#define DELTA_MAX_RADIUS 140.0 // (mm)
548+
549+
// Center-to-center distance of the holes in the diagonal push rods.
550+
#define DELTA_DIAGONAL_ROD 250.0 // (mm)
551+
552+
// Distance between bed and nozzle Z home position
553+
#define DELTA_HEIGHT 250.00 // (mm) Get this value from G33 auto calibrate
554+
555+
#define DELTA_ENDSTOP_ADJ { 0.0, 0.0, 0.0 } // Get these values from G33 auto calibrate
556+
557+
// Horizontal distance bridged by diagonal push rods when effector is centered.
558+
#define DELTA_RADIUS 124.0 // (mm) Get this value from G33 auto calibrate
559+
560+
// Trim adjustments for individual towers
561+
// tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
562+
// measured in degrees anticlockwise looking from above the printer
563+
#define DELTA_TOWER_ANGLE_TRIM { 0.0, 0.0, 0.0 } // Get these values from G33 auto calibrate
564+
565+
// Delta radius and diagonal rod adjustments (mm)
566+
//#define DELTA_RADIUS_TRIM_TOWER { 0.0, 0.0, 0.0 }
567+
//#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 }
568+
#endif
569+
570+
// @section scara
571+
572+
/**
573+
* MORGAN_SCARA was developed by QHARLEY in South Africa in 2012-2013.
574+
* Implemented and slightly reworked by JCERNY in June, 2014.
575+
*
576+
* Mostly Printed SCARA is an open source design by Tyler Williams. See:
577+
* https://www.thingiverse.com/thing:2487048
578+
* https://www.thingiverse.com/thing:1241491
579+
*/
580+
//#define MORGAN_SCARA
581+
//#define MP_SCARA
582+
#if EITHER(MORGAN_SCARA, MP_SCARA)
583+
// If movement is choppy try lowering this value
584+
#define DEFAULT_SEGMENTS_PER_SECOND 200
585+
586+
// Length of inner and outer support arms. Measure arm lengths precisely.
587+
#define SCARA_LINKAGE_1 150 // (mm)
588+
#define SCARA_LINKAGE_2 150 // (mm)
589+
590+
// SCARA tower offset (position of Tower relative to bed zero position)
591+
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
592+
#define SCARA_OFFSET_X 100 // (mm)
593+
#define SCARA_OFFSET_Y -56 // (mm)
594+
595+
#if ENABLED(MORGAN_SCARA)
596+
597+
//#define DEBUG_SCARA_KINEMATICS
598+
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
599+
600+
// Radius around the center where the arm cannot reach
601+
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
602+
603+
#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
604+
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
605+
606+
#elif ENABLED(MP_SCARA)
607+
608+
#define SCARA_OFFSET_THETA1 12 // degrees
609+
#define SCARA_OFFSET_THETA2 131 // degrees
610+
611+
#endif
612+
613+
#endif
614+
615+
// @section tpara
616+
617+
// Enable for TPARA kinematics and configure below
618+
//#define AXEL_TPARA
619+
#if ENABLED(AXEL_TPARA)
620+
#define DEBUG_TPARA_KINEMATICS
621+
#define DEFAULT_SEGMENTS_PER_SECOND 200
622+
623+
// Length of inner and outer support arms. Measure arm lengths precisely.
624+
#define TPARA_LINKAGE_1 120 // (mm)
625+
#define TPARA_LINKAGE_2 120 // (mm)
626+
627+
// SCARA tower offset (position of Tower relative to bed zero position)
628+
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
629+
#define TPARA_OFFSET_X 0 // (mm)
630+
#define TPARA_OFFSET_Y 0 // (mm)
631+
#define TPARA_OFFSET_Z 0 // (mm)
632+
633+
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
634+
635+
// Radius around the center where the arm cannot reach
636+
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
637+
638+
// Calculated from Calibration Guide and M360 / M114. See http://reprap.harleystudio.co.za/?page_id=1073
639+
#define THETA_HOMING_OFFSET 0
640+
#define PSI_HOMING_OFFSET 0
641+
#endif
642+
643+
// @section polar
644+
645+
/**
646+
* POLAR Kinematics
647+
* developed by Kadir ilkimen for PolarBear CNC and babyBear
648+
* https://github.com/kadirilkimen/Polar-Bear-Cnc-Machine
649+
* https://github.com/kadirilkimen/babyBear-3D-printer
650+
*
651+
* A polar machine can have different configurations.
652+
* This kinematics is only compatible with the following configuration:
653+
* X : Independent linear
654+
* Y or B : Polar
655+
* Z : Independent linear
656+
*
657+
* For example, PolarBear has CoreXZ plus Polar Y or B.
658+
*
659+
* Motion problem for Polar axis near center / origin:
660+
*
661+
* 3D printing:
662+
* Movements very close to the center of the polar axis take more time than others.
663+
* This brief delay results in more material deposition due to the pressure in the nozzle.
664+
*
665+
* Current Kinematics and feedrate scaling deals with this by making the movement as fast
666+
* as possible. It works for slow movements but doesn't work well with fast ones. A more
667+
* complicated extrusion compensation must be implemented.
668+
*
669+
* Ideally, it should estimate that a long rotation near the center is ahead and will cause
670+
* unwanted deposition. Therefore it can compensate the extrusion beforehand.
671+
*
672+
* Laser cutting:
673+
* Same thing would be a problem for laser engraving too. As it spends time rotating at the
674+
* center point, more likely it will burn more material than it should. Therefore similar
675+
* compensation would be implemented for laser-cutting operations.
676+
*
677+
* Milling:
678+
* This shouldn't be a problem for cutting/milling operations.
679+
*/
680+
//#define POLAR
681+
#if ENABLED(POLAR)
682+
#define DEFAULT_SEGMENTS_PER_SECOND 180 // If movement is choppy try lowering this value
683+
#define PRINTABLE_RADIUS 82.0f // (mm) Maximum travel of X axis
684+
685+
// Movements fall inside POLAR_FAST_RADIUS are assigned the highest possible feedrate
686+
// to compensate unwanted deposition related to the near-origin motion problem.
687+
#define POLAR_FAST_RADIUS 3.0f // (mm)
688+
689+
// Radius which is unreachable by the tool.
690+
// Needed if the tool is not perfectly aligned to the center of the polar axis.
691+
#define POLAR_CENTER_OFFSET 0.0f // (mm)
692+
693+
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
694+
#endif
695+
696+
// @section machine
697+
698+
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
699+
//#define ARTICULATED_ROBOT_ARM
700+
701+
// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
702+
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
703+
//#define FOAMCUTTER_XYUV
704+
501705
//===========================================================================
502706
//============================== Endstop Settings ===========================
503707
//===========================================================================
@@ -755,8 +959,75 @@
755959
//
756960

757961
/**
758-
* Z Probe to nozzle (X,Y) offset, relative to (0, 0).
759-
* X and Y offsets must be integers.
962+
* Magnetically Mounted Probe
963+
* For probes such as Euclid, Klicky, Klackender, etc.
964+
*/
965+
//#define MAG_MOUNTED_PROBE
966+
#if ENABLED(MAG_MOUNTED_PROBE)
967+
#define PROBE_DEPLOY_FEEDRATE (133*60) // (mm/min) Probe deploy speed
968+
#define PROBE_STOW_FEEDRATE (133*60) // (mm/min) Probe stow speed
969+
970+
#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe
971+
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock
972+
#define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
973+
#define MAG_MOUNTED_DEPLOY_4 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
974+
#define MAG_MOUNTED_DEPLOY_5 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
975+
#define MAG_MOUNTED_STOW_1 { PROBE_STOW_FEEDRATE, { 245, 114, 20 } } // Move to dock
976+
#define MAG_MOUNTED_STOW_2 { PROBE_STOW_FEEDRATE, { 245, 114, 0 } } // Place probe beside remover
977+
#define MAG_MOUNTED_STOW_3 { PROBE_STOW_FEEDRATE, { 230, 114, 0 } } // Side move to remove probe
978+
#define MAG_MOUNTED_STOW_4 { PROBE_STOW_FEEDRATE, { 210, 114, 20 } } // Side move to remove probe
979+
#define MAG_MOUNTED_STOW_5 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
980+
#endif
981+
982+
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
983+
// When the pin is defined you can use M672 to set/reset the probe sensitivity.
984+
//#define DUET_SMART_EFFECTOR
985+
#if ENABLED(DUET_SMART_EFFECTOR)
986+
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
987+
#endif
988+
989+
/**
990+
* Use StallGuard2 to probe the bed with the nozzle.
991+
* Requires stallGuard-capable Trinamic stepper drivers.
992+
* CAUTION: This can damage machines with Z lead screws.
993+
* Take extreme care when setting up this feature.
994+
*/
995+
//#define SENSORLESS_PROBING
996+
997+
/**
998+
* Allen key retractable z-probe as seen on many Kossel delta printers - https://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
999+
* Deploys by touching z-axis belt. Retracts by pushing the probe down.
1000+
*/
1001+
//#define Z_PROBE_ALLEN_KEY
1002+
#if ENABLED(Z_PROBE_ALLEN_KEY)
1003+
// 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
1004+
// if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.
1005+
1006+
#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, PRINTABLE_RADIUS, 100.0 }
1007+
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE
1008+
1009+
#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, PRINTABLE_RADIUS, 100.0 }
1010+
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10
1011+
1012+
#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (PRINTABLE_RADIUS) * 0.75, 100.0 }
1013+
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE
1014+
1015+
#define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
1016+
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_FEEDRATE
1017+
1018+
#define Z_PROBE_ALLEN_KEY_STOW_2 { -64.0, 56.0, 3.0 } // Push it down
1019+
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_FEEDRATE)/10
1020+
1021+
#define Z_PROBE_ALLEN_KEY_STOW_3 { -64.0, 56.0, 50.0 } // Move it up to clear
1022+
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_FEEDRATE
1023+
1024+
#define Z_PROBE_ALLEN_KEY_STOW_4 { 0.0, 0.0, 50.0 }
1025+
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_FEEDRATE
1026+
1027+
#endif // Z_PROBE_ALLEN_KEY
1028+
1029+
/**
1030+
* Nozzle-to-Probe offsets { X, Y, Z }
7601031
*
7611032
* In the following example the X and Y offsets are both positive:
7621033
* #define X_PROBE_OFFSET_FROM_EXTRUDER 10

Marlin/Configuration_adv.h

+9-6
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,15 @@
160160
// before a MINTEMP error is triggered. (Shouldn't be more than 10.)
161161
//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
162162

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

170173
// @section extruder
171174

Marlin/Version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
//#define STRING_DISTRIBUTION_DATE "2023-01-09"
44+
//#define STRING_DISTRIBUTION_DATE "2023-01-11"
4545

4646
/**
4747
* Defines a generic printer name to be output to the LCD after booting Marlin.

Marlin/src/HAL/NATIVE_SIM/HAL.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ class MarlinHAL {
208208
MarlinHAL() {}
209209

210210
// Watchdog
211-
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
212-
static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {});
211+
static void watchdog_init();
212+
static void watchdog_refresh();
213213

214214
static void init() {} // Called early in setup()
215215
static void init_board() {} // Called less early in setup()

Marlin/src/MarlinCore.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
#include "module/polargraph.h"
169169
#elif IS_SCARA
170170
#include "module/scara.h"
171+
#elif ENABLED(POLAR)
172+
#include "module/polar.h"
171173
#endif
172174

173175
#if HAS_LEVELING

Marlin/src/core/language.h

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@
279279
#define STR_S_SEG_PER_SEC "S<seg-per-sec>"
280280
#define STR_DELTA_SETTINGS "Delta (L<diagonal-rod> R<radius> H<height> S<seg-per-sec> XYZ<tower-angle-trim> ABC<rod-trim>)"
281281
#define STR_SCARA_SETTINGS "SCARA"
282+
#define STR_POLAR_SETTINGS "Polar"
282283
#define STR_POLARGRAPH_SETTINGS "Polargraph"
283284
#define STR_SCARA_P_T_Z "P<theta-psi-offset> T<theta-offset> Z<home-offset>"
284285
#define STR_ENDSTOP_ADJUSTMENT "Endstop adjustment"

0 commit comments

Comments
 (0)