Skip to content

Commit

Permalink
🔧 Fix TPARA (…SCARA, DELTA) settings (MarlinFirmware#25016)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and Andy-Big committed Jul 2, 2023
1 parent c9affce commit ef8ad49
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
32 changes: 16 additions & 16 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@
//#define POLARGRAPH
#if ENABLED(POLARGRAPH)
#define POLARGRAPH_MAX_BELT_LEN 1035.0
#define POLAR_SEGMENTS_PER_SECOND 5
#define DEFAULT_SEGMENTS_PER_SECOND 5
#endif

// @section delta
Expand All @@ -908,28 +908,28 @@
// 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 DELTA_SEGMENTS_PER_SECOND 200
#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
// uncomment to add three points calibration menu option.
// Add three-point calibration to the MarlinUI menu.
// See http://minow.blogspot.com/index.html#4918805519571907051
//#define DELTA_CALIBRATION_MENU

// uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
// G33 Delta Auto-Calibration. Enable EEPROM_SETTINGS to store results.
//#define DELTA_AUTO_CALIBRATION

// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them

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

// NOTE: All values for DELTA_* values MUST be floating point, so always have a decimal point in them

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

Expand Down Expand Up @@ -974,7 +974,7 @@
//#define MP_SCARA
#if EITHER(MORGAN_SCARA, MP_SCARA)
// If movement is choppy try lowering this value
#define SCARA_SEGMENTS_PER_SECOND 200
#define DEFAULT_SEGMENTS_PER_SECOND 200

// Length of inner and outer support arms. Measure arm lengths precisely.
#define SCARA_LINKAGE_1 150 // (mm)
Expand Down Expand Up @@ -1010,18 +1010,18 @@
// Enable for TPARA kinematics and configure below
//#define AXEL_TPARA
#if ENABLED(AXEL_TPARA)
#define DEBUG_ROBOT_KINEMATICS
#define ROBOT_SEGMENTS_PER_SECOND 200
#define DEBUG_TPARA_KINEMATICS
#define DEFAULT_SEGMENTS_PER_SECOND 200

// Length of inner and outer support arms. Measure arm lengths precisely.
#define ROBOT_LINKAGE_1 120 // (mm)
#define ROBOT_LINKAGE_2 120 // (mm)
#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 ROBOT_OFFSET_X 0 // (mm)
#define ROBOT_OFFSET_Y 0 // (mm)
#define ROBOT_OFFSET_Z 0 // (mm)
#define TPARA_OFFSET_X 0 // (mm)
#define TPARA_OFFSET_Y 0 // (mm)
#define TPARA_OFFSET_Z 0 // (mm)

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

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@
#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)
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DEFAULT_SEGMENTS_PER_SECOND)
#elif ENABLED(POLARGRAPH)
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DEFAULT_SEGMENTS_PER_SECOND)
#else // CARTESIAN
#ifdef LEVELED_SEGMENT_LENGTH
#define DELTA_SEGMENT_MIN_LENGTH LEVELED_SEGMENT_LENGTH
Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,12 @@
*/
#if IS_SCARA
#undef SLOWDOWN
#if DISABLED(AXEL_TPARA)
#if ENABLED(AXEL_TPARA)
#define SCARA_PRINTABLE_RADIUS (TPARA_LINKAGE_1 + TPARA_LINKAGE_2)
#else
#define QUICK_HOME
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
#endif
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
#endif

/**
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@
#error "SHOW_SD_PERCENT is now SHOW_PROGRESS_PERCENT."
#elif defined(EXTRA_LIN_ADVANCE_K)
#error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA."
#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND)
#error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND."
#endif

// L64xx stepper drivers have been removed
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/scara.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "../MarlinCore.h"
#endif

float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SEGMENTS_PER_SECOND);
float segments_per_second = DEFAULT_SEGMENTS_PER_SECOND;

#if EITHER(MORGAN_SCARA, MP_SCARA)

Expand Down
6 changes: 1 addition & 5 deletions Marlin/src/module/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3221,11 +3221,7 @@ void MarlinSettings::reset() {
//

#if IS_KINEMATIC
segments_per_second = (
TERN_(DELTA, DELTA_SEGMENTS_PER_SECOND)
TERN_(IS_SCARA, SCARA_SEGMENTS_PER_SECOND)
TERN_(POLARGRAPH, POLAR_SEGMENTS_PER_SECOND)
);
segments_per_second = DEFAULT_SEGMENTS_PER_SECOND;
#if ENABLED(DELTA)
const abc_float_t adj = DELTA_ENDSTOP_ADJ, dta = DELTA_TOWER_ANGLE_TRIM, ddr = DELTA_DIAGONAL_ROD_TRIM_TOWER;
delta_height = DELTA_HEIGHT;
Expand Down

0 comments on commit ef8ad49

Please sign in to comment.